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-05-26 08:39:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-05-26 08:39:31 +0400
commit30dd4fafd13e84ed7363c0c0f6ab17a384098450 (patch)
treede0b558fe48f4a25be9d328c9b645a9795d458e4 /source/blender/python/api2_2x/Library.c
parentea9b3dc387f5a167cf6b9e53f7be63e9b76de241 (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/Library.c')
-rw-r--r--source/blender/python/api2_2x/Library.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/python/api2_2x/Library.c b/source/blender/python/api2_2x/Library.c
index 5881c88f654..495f6eabf44 100644
--- a/source/blender/python/api2_2x/Library.c
+++ b/source/blender/python/api2_2x/Library.c
@@ -190,7 +190,7 @@ static PyObject *M_Library_Open( PyObject * self, PyObject * args )
if( bpy_openlibname )
PyOS_snprintf( bpy_openlibname, len, "%s", fname1 );
- return Py_BuildValue( "i", 1 );
+ Py_RETURN_TRUE;
}
/**
@@ -275,16 +275,14 @@ static PyObject *M_Library_Datablocks( PyObject * self, PyObject * args )
list = PyList_New( BLI_linklist_length( names ) );
for( l = names; l; l = l->next ) {
PyList_SET_ITEM( list, counter,
- Py_BuildValue( "s",
- ( char * ) l->link ) );
+ PyString_FromString( ( char * ) l->link ) );
counter++;
}
BLI_linklist_free( names, free ); /* free linklist *and* each node's data */
return list;
}
- Py_INCREF( Py_None );
- return Py_None;
+ Py_RETURN_NONE;
}
/**