py3: App: files D-Z ported to python3
issue 0000995 diff to py3-branch will remain in the following files in src/App: - ExtensionContainer.cpp - FeaturePythonPyImp.h +.inl most likely these files depend on Tools and Base
This commit is contained in:
@@ -37,6 +37,29 @@
|
||||
virtual ~_class_(); \
|
||||
};
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
#define PYTHON_TYPE_IMP(_class_, _subclass_) \
|
||||
PyTypeObject _class_::Type = { \
|
||||
PyVarObject_HEAD_INIT(&PyType_Type, 0) \
|
||||
""#_class_"", \
|
||||
sizeof(_class_), \
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
|
||||
Py_TPFLAGS_BASETYPE|Py_TPFLAGS_DEFAULT, \
|
||||
""#_class_"", \
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, \
|
||||
&_subclass_::Type, \
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 \
|
||||
}; \
|
||||
_class_::_class_(Base::BaseClass *pcObject, PyTypeObject *T) \
|
||||
: _subclass_(reinterpret_cast<_subclass_::PointerType>(pcObject), T) \
|
||||
{ \
|
||||
} \
|
||||
_class_::~_class_() \
|
||||
{ \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define PYTHON_TYPE_IMP(_class_, _subclass_) \
|
||||
PyTypeObject _class_::Type = { \
|
||||
PyObject_HEAD_INIT(&PyType_Type) \
|
||||
@@ -58,6 +81,8 @@
|
||||
{ \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
namespace App
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user