diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-05-26 08:39:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-05-26 08:39:31 +0400 |
commit | 30dd4fafd13e84ed7363c0c0f6ab17a384098450 (patch) | |
tree | de0b558fe48f4a25be9d328c9b645a9795d458e4 /source/blender/python/api2_2x/Text.c | |
parent | ea9b3dc387f5a167cf6b9e53f7be63e9b76de241 (diff) |
More memory leaks fixed - in IDProp, Bone.head, tail, matrix, ob.DupObjects (my fault) and in Effect module as well as a few others.
Also stopped using Py_BuildValue for strings, ints and floats.
Diffstat (limited to 'source/blender/python/api2_2x/Text.c')
-rw-r--r-- | source/blender/python/api2_2x/Text.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/Text.c b/source/blender/python/api2_2x/Text.c index ea1f5aeb8f1..e106bfea482 100644 --- a/source/blender/python/api2_2x/Text.c +++ b/source/blender/python/api2_2x/Text.c @@ -436,7 +436,7 @@ static PyObject *Text_write( BPy_Text * self, PyObject * args ) static PyObject *Text_asLines( BPy_Text * self ) { TextLine *line; - PyObject *list, *ob; + PyObject *list, *tmpstr; if( !self->text ) return EXPP_ReturnPyObjError( PyExc_RuntimeError, @@ -450,9 +450,9 @@ static PyObject *Text_asLines( BPy_Text * self ) "couldn't create PyList" ); while( line ) { - ob = Py_BuildValue( "s", line->line ); - PyList_Append( list, ob ); - Py_DECREF(ob); + tmpstr = PyString_FromString( line->line ); + PyList_Append( list, tmpstr ); + Py_DECREF(tmpstr); line = line->next; } |