Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-04-02 06:45:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-04-02 06:45:57 +0400
commitc0fef58e48acc9bf79518ef5cb53ccac063947cc (patch)
tree262734c369e6f18ccea91114c16fba31363b3128 /source/blender/python/api2_2x/windowTheme.c
parentdca213525a018b688216e785eaede4508332bf1d (diff)
PyAPI
reverting python dealloc function removal, caused Save Theme to crash.
Diffstat (limited to 'source/blender/python/api2_2x/windowTheme.c')
-rw-r--r--source/blender/python/api2_2x/windowTheme.c24
1 files changed, 21 insertions, 3 deletions
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;