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/rgbTuple.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/rgbTuple.c')
-rw-r--r-- | source/blender/python/api2_2x/rgbTuple.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/python/api2_2x/rgbTuple.c b/source/blender/python/api2_2x/rgbTuple.c index 8536d641042..cdd05a60917 100644 --- a/source/blender/python/api2_2x/rgbTuple.c +++ b/source/blender/python/api2_2x/rgbTuple.c @@ -206,7 +206,7 @@ static PyObject *rgbTuple_getAttr( BPy_rgbTuple * self, char *name ) return ( EXPP_ReturnPyObjError( PyExc_AttributeError, "attribute not found" ) ); - return Py_BuildValue( "f", *( self->rgb[i] ) ); + return PyFloat_FromDouble( (double)(*( self->rgb[i] )) ); } /*****************************************************************************/ @@ -271,7 +271,7 @@ static PyObject *rgbTupleSubscript( BPy_rgbTuple * self, PyObject * key ) else return EXPP_ReturnPyObjError( PyExc_AttributeError, name ); - return Py_BuildValue( "f", *( self->rgb[i] ) ); + return PyFloat_FromDouble( (double)(*( self->rgb[i] )) ); } static int rgbTupleAssSubscript( BPy_rgbTuple * self, PyObject * key, @@ -316,7 +316,7 @@ static PyObject *rgbTupleItem( BPy_rgbTuple * self, int i ) return EXPP_ReturnPyObjError( PyExc_IndexError, "array index out of range" ); - return Py_BuildValue( "f", *( self->rgb[i] ) ); + return PyFloat_FromDouble( (long)(*( self->rgb[i] )) ); } static PyObject *rgbTupleSlice( BPy_rgbTuple * self, int begin, int end ) |