+ replace old C casts with static_cast in generated C++ code, remove unused parent structure of Python classes, support of -1 as return value of setCustomAttributes
This commit is contained in:
@@ -223,11 +223,6 @@ PyMethodDef ParameterGrpPy::Methods[] = {
|
||||
{NULL, NULL, 0, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Parents structure
|
||||
//--------------------------------------------------------------------------
|
||||
PyParentObject ParameterGrpPy::Parents[] = {&PyObjectBase::Type,&ParameterGrpPy::Type, NULL};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// constructor
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -132,11 +132,6 @@ PyMethodDef PyObjectBase::Methods[] = {
|
||||
{NULL, NULL, 0, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
/*------------------------------
|
||||
* PyObjectBase Parents -- Every class, even the abstract one should have parents
|
||||
------------------------------*/
|
||||
PyParentObject PyObjectBase::Parents[] = {&PyObjectBase::Type, NULL};
|
||||
|
||||
PyObject* PyObjectBase::__getattr(PyObject * obj, char *attr)
|
||||
{
|
||||
// This should be the entry in Type
|
||||
|
||||
@@ -143,9 +143,7 @@ typedef PyTypeObject * PyParentObject;
|
||||
public: \
|
||||
static PyTypeObject Type; \
|
||||
static PyMethodDef Methods[]; \
|
||||
static PyParentObject Parents[]; \
|
||||
virtual PyTypeObject *GetType(void) {return &Type;} \
|
||||
virtual PyParentObject *GetParents(void) {return Parents;}
|
||||
virtual PyTypeObject *GetType(void) {return &Type;}
|
||||
|
||||
/** This defines the _getattr_up macro
|
||||
* which allows attribute and method calls
|
||||
@@ -485,9 +483,6 @@ BaseExport extern PyObject* BaseExceptionFreeCADError;
|
||||
|
||||
#endif // DONT_CATCH_CXX_EXCEPTIONS
|
||||
|
||||
/// Root definition of the inheritance tree of the FreeCAD python objects
|
||||
#define PARENTSBasePyObjectBase &Base::PyObjectBase::Type,NULL
|
||||
|
||||
/** Python helper class
|
||||
* This class encapsulate the Decoding of UTF8 to a python object.
|
||||
* Including exception handling.
|
||||
|
||||
Reference in New Issue
Block a user