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:
looooo
2017-05-11 09:55:40 +02:00
committed by wmayer
parent ce67325616
commit e6202f46e9
10 changed files with 389 additions and 20 deletions

View File

@@ -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
{