diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2003-07-05 05:18:41 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2003-07-05 05:18:41 +0400 |
commit | aa820ec42094c2799ca618d3ee174993358c9573 (patch) | |
tree | 41a122e1c1abf87dbe0911548568c1301a277cf2 /source/blender/python/api2_2x/Scene.c | |
parent | 20df091c042be721fae0cac911844d603f1dd140 (diff) |
Exppython:
- Continued getting rid of print methods and updating repr ones:
Needed to fix crashes on Windows >= 98 systems.
- Found and fixed a few small memory leaks in EXPP_interface, related to
execution of script links.
Diffstat (limited to 'source/blender/python/api2_2x/Scene.c')
-rw-r--r-- | source/blender/python/api2_2x/Scene.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/python/api2_2x/Scene.c b/source/blender/python/api2_2x/Scene.c index 72516fc02a3..11b2db24c75 100644 --- a/source/blender/python/api2_2x/Scene.c +++ b/source/blender/python/api2_2x/Scene.c @@ -163,7 +163,6 @@ static PyMethodDef BPy_Scene_methods[] = { /* Python Scene_Type callback function prototypes: */ /*****************************************************************************/ static void Scene_dealloc (BPy_Scene *self); -static int Scene_print (BPy_Scene *self, FILE *fp, int flags); static int Scene_setAttr (BPy_Scene *self, char *name, PyObject *v); static int Scene_compare (BPy_Scene *a, BPy_Scene *b); static PyObject *Scene_getAttr (BPy_Scene *self, char *name); @@ -181,7 +180,7 @@ PyTypeObject Scene_Type = 0, /* tp_itemsize */ /* methods */ (destructor)Scene_dealloc, /* tp_dealloc */ - (printfunc)Scene_print, /* tp_print */ + 0, /* tp_print */ (getattrfunc)Scene_getAttr, /* tp_getattr */ (setattrfunc)Scene_setAttr, /* tp_setattr */ (cmpfunc)Scene_compare, /* tp_compare */ @@ -730,15 +729,9 @@ static int Scene_compare (BPy_Scene *a, BPy_Scene *b) return (pa == pb) ? 0:-1; } -static int Scene_print(BPy_Scene *self, FILE *fp, int flags) -{ - fprintf(fp, "[Scene \"%s\"]", self->scene->id.name+2); - return 0; -} - static PyObject *Scene_repr (BPy_Scene *self) { - return PyString_FromString(self->scene->id.name+2); + return PyString_FromFormat("[Scene \"%s\"]", self->scene->id.name+2); } Base *EXPP_Scene_getObjectBase(Scene *scene, Object *object) |