===Python API===

Fix for Cygwin/GCC compile errors: doesn't like PyObject_Del() in the
PyTypeObject declarations :-P
This commit is contained in:
Ken Hughes
2006-04-23 17:15:20 +00:00
parent 6f94c5ef5e
commit e6db82ec04

View File

@@ -156,6 +156,7 @@ static PyMappingMethods Modifier_as_mapping = {
/*****************************************************************************/
/* Python Modifier_Type callback function prototypes: */
/*****************************************************************************/
static void Modifier_dealloc( BPy_Modifier * self );
static PyObject *Modifier_repr( BPy_Modifier * self );
/*****************************************************************************/
@@ -171,7 +172,7 @@ PyTypeObject Modifier_Type = {
/* Methods to implement standard operations */
( destructor ) PyObject_Del,/* destructor tp_dealloc; */
( destructor ) Modifier_dealloc,/* destructor tp_dealloc; */
NULL, /* printfunc tp_print; */
NULL, /* getattrfunc tp_getattr; */
NULL, /* setattrfunc tp_setattr; */
@@ -881,6 +882,16 @@ static int Modifier_setData( BPy_Modifier * self, PyObject * key,
"unsupported modifier type" );
}
/*****************************************************************************/
/* Function: Modifier_dealloc */
/* Description: This is a callback function for the BPy_Modifier type. It */
/* destroys data when the object is deleted. */
/*****************************************************************************/
static void Modifier_dealloc( BPy_Modifier * self )
{
PyObject_DEL( self );
}
/*****************************************************************************/
/* Function: Modifier_repr */
/* Description: This is a callback function for the BPy_Modifier type. It */
@@ -1066,6 +1077,16 @@ static PyObject *ModSeq_remove( BPy_ModSeq *self, PyObject *args )
Py_RETURN_NONE;
}
/*****************************************************************************/
/* Function: ModSeq_dealloc */
/* Description: This is a callback function for the BPy_Modifier type. It */
/* destroys data when the object is deleted. */
/*****************************************************************************/
static void ModSeq_dealloc( BPy_Modifier * self )
{
PyObject_DEL( self );
}
/*****************************************************************************/
/* Python BPy_ModSeq methods table: */
/*****************************************************************************/
@@ -1091,7 +1112,7 @@ PyTypeObject ModSeq_Type = {
/* Methods to implement standard operations */
( destructor ) PyObject_Del,/* destructor tp_dealloc; */
( destructor ) ModSeq_dealloc,/* destructor tp_dealloc; */
NULL, /* printfunc tp_print; */
NULL, /* getattrfunc tp_getattr; */
NULL, /* setattrfunc tp_setattr; */