Merge pull request #20643 from tritao/python-gen-include-pycxx
Tools: Add PyCXX includes to generated Python binding files.
This commit is contained in:
@@ -25,36 +25,11 @@
|
||||
|
||||
// clang-format off
|
||||
// NOLINTBEGIN(cppcoreguidelines-macro-usage)
|
||||
// Std. configurations
|
||||
|
||||
// (re-)defined in pyconfig.h
|
||||
#if defined (_POSIX_C_SOURCE)
|
||||
# undef _POSIX_C_SOURCE
|
||||
#endif
|
||||
#if defined (_XOPEN_SOURCE)
|
||||
# undef _XOPEN_SOURCE
|
||||
#endif
|
||||
|
||||
// needed header
|
||||
#undef slots
|
||||
#include <Python.h>
|
||||
#ifdef FC_OS_MACOSX
|
||||
#undef toupper
|
||||
#undef tolower
|
||||
#undef isupper
|
||||
#undef islower
|
||||
#undef isspace
|
||||
#undef isalpha
|
||||
#undef isalnum
|
||||
#endif
|
||||
#define slots
|
||||
#include <bitset>
|
||||
#include <cstring>
|
||||
|
||||
#include "Exception.h"
|
||||
|
||||
#include <CXX/Objects.hxx>
|
||||
|
||||
#include "Exception.h"
|
||||
|
||||
/** Python static class macro for definition
|
||||
* sets up a static function entry in a class inheriting
|
||||
|
||||
@@ -123,6 +123,7 @@ class TemplateClassPyExport(template.ModelTemplate):
|
||||
#ifndef @self.export.Namespace.upper().replace("::", "_")@_@self.export.Name.upper()@_H
|
||||
#define @self.export.Namespace.upper().replace("::", "_")@_@self.export.Name.upper()@_H
|
||||
|
||||
#include <CXX/Objects.hxx>
|
||||
#include <@self.export.FatherInclude@>
|
||||
#include <@self.export.Include@>
|
||||
#include <string>
|
||||
|
||||
Reference in New Issue
Block a user