diff --git a/source/blender/python/api2_2x/charRGBA.c b/source/blender/python/api2_2x/charRGBA.c index 35ff546d0d5..64c3902c491 100644 --- a/source/blender/python/api2_2x/charRGBA.c +++ b/source/blender/python/api2_2x/charRGBA.c @@ -77,6 +77,11 @@ static PySequenceMethods charRGBAAsSequence = { ( intintobjargproc ) charRGBAAssSlice, /* sq_ass_slice */ }; +static void charRGBA_dealloc( BPy_charRGBA * self ) +{ + PyObject_DEL( self ); +} + /*****************************************************************************/ /* Python charRGBA_Type structure definition: */ /*****************************************************************************/ @@ -87,7 +92,7 @@ PyTypeObject charRGBA_Type = { sizeof( BPy_charRGBA ), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ - NULL, /* tp_dealloc */ + ( destructor ) charRGBA_dealloc, /* tp_dealloc */ 0, /* tp_print */ ( getattrfunc ) charRGBA_getAttr, /* tp_getattr */ ( setattrfunc ) charRGBA_setAttr, /* tp_setattr */ diff --git a/source/blender/python/api2_2x/windowTheme.c b/source/blender/python/api2_2x/windowTheme.c index a86f80f7e5f..237cf1d0dae 100644 --- a/source/blender/python/api2_2x/windowTheme.c +++ b/source/blender/python/api2_2x/windowTheme.c @@ -94,6 +94,7 @@ struct PyMethodDef M_Theme_methods[] = { {NULL, NULL, 0, NULL} }; +static void ThemeSpace_dealloc( BPy_ThemeSpace * self ); static int ThemeSpace_compare( BPy_ThemeSpace * a, BPy_ThemeSpace * b ); static PyObject *ThemeSpace_repr( BPy_ThemeSpace * self ); static PyObject *ThemeSpace_getAttr( BPy_ThemeSpace * self, char *name ); @@ -110,7 +111,7 @@ PyTypeObject ThemeSpace_Type = { sizeof( BPy_ThemeSpace ), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ - 0, /* tp_dealloc */ + ( destructor ) ThemeSpace_dealloc, /* tp_dealloc */ 0, /* tp_print */ ( getattrfunc ) ThemeSpace_getAttr, /* tp_getattr */ ( setattrfunc ) ThemeSpace_setAttr, /* tp_setattr */ @@ -128,6 +129,11 @@ PyTypeObject ThemeSpace_Type = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; +static void ThemeSpace_dealloc( BPy_ThemeSpace * self ) +{ + PyObject_DEL( self ); +} + #define ELSEIF_TSP_RGBA(attr)\ else if (!strcmp(name, #attr))\ attrib = charRGBA_New(&tsp->attr[0]); @@ -330,6 +336,7 @@ static PyObject *ThemeSpace_repr( BPy_ThemeSpace * self ) self->theme->name ); } +static void ThemeUI_dealloc( BPy_ThemeUI * self ); static int ThemeUI_compare( BPy_ThemeUI * a, BPy_ThemeUI * b ); static PyObject *ThemeUI_repr( BPy_ThemeUI * self ); static PyObject *ThemeUI_getAttr( BPy_ThemeUI * self, char *name ); @@ -345,7 +352,7 @@ PyTypeObject ThemeUI_Type = { sizeof( BPy_ThemeUI ), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ - 0, /* tp_dealloc */ + ( destructor ) ThemeUI_dealloc, /* tp_dealloc */ 0, /* tp_print */ ( getattrfunc ) ThemeUI_getAttr, /* tp_getattr */ ( setattrfunc ) ThemeUI_setAttr, /* tp_setattr */ @@ -363,6 +370,11 @@ PyTypeObject ThemeUI_Type = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; +static void ThemeUI_dealloc( BPy_ThemeUI * self ) +{ + PyObject_DEL( self ); +} + #define ELSEIF_TUI_RGBA(attr)\ else if (!strcmp(name, #attr))\ attrib = charRGBA_New(&tui->attr[0]); @@ -500,6 +512,7 @@ static PyObject *ThemeUI_repr( BPy_ThemeUI * self ) self->theme->name ); } +static void Theme_dealloc( BPy_Theme * self ); static int Theme_compare( BPy_Theme * a, BPy_Theme * b ); static PyObject *Theme_getAttr( BPy_Theme * self, char *name ); static PyObject *Theme_repr( BPy_Theme * self ); @@ -529,7 +542,7 @@ PyTypeObject Theme_Type = { sizeof( BPy_Theme ), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ - 0, /* tp_dealloc */ + ( destructor ) Theme_dealloc, /* tp_dealloc */ 0, /* tp_print */ ( getattrfunc ) Theme_getAttr, /* tp_getattr */ 0, //(setattrfunc) Theme_setAttr, /* tp_setattr */ @@ -787,6 +800,11 @@ PyObject *Theme_Init( void ) return submodule; } +static void Theme_dealloc( BPy_Theme * self ) +{ + PyObject_DEL( self ); +} + static PyObject *Theme_getAttr( BPy_Theme * self, char *name ) { PyObject *attr = Py_None;