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:
authorWillian Padovani Germano <wpgermano@gmail.com>2003-07-05 05:18:41 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2003-07-05 05:18:41 +0400
commitaa820ec42094c2799ca618d3ee174993358c9573 (patch)
tree41a122e1c1abf87dbe0911548568c1301a277cf2 /source/blender/python/api2_2x/Lamp.c
parent20df091c042be721fae0cac911844d603f1dd140 (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/Lamp.c')
-rw-r--r--source/blender/python/api2_2x/Lamp.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/source/blender/python/api2_2x/Lamp.c b/source/blender/python/api2_2x/Lamp.c
index a5abfb5ebd3..5b9086fd680 100644
--- a/source/blender/python/api2_2x/Lamp.c
+++ b/source/blender/python/api2_2x/Lamp.c
@@ -42,12 +42,12 @@ PyTypeObject Lamp_Type =
sizeof (BPy_Lamp), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
- (destructor)Lamp_dealloc, /* tp_dealloc */
- (printfunc)Lamp_print, /* tp_print */
- (getattrfunc)Lamp_getAttr, /* tp_getattr */
- (setattrfunc)Lamp_setAttr, /* tp_setattr */
- (cmpfunc)Lamp_compare, /* tp_compare */
- (reprfunc)Lamp_repr, /* tp_repr */
+ (destructor)Lamp_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ (getattrfunc)Lamp_getAttr, /* tp_getattr */
+ (setattrfunc)Lamp_setAttr, /* tp_setattr */
+ (cmpfunc)Lamp_compare, /* tp_compare */
+ (reprfunc)Lamp_repr, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
@@ -1025,22 +1025,11 @@ static int Lamp_compare (BPy_Lamp *a, BPy_Lamp *b)
}
/*****************************************************************************/
-/* Function: Lamp_print */
-/* Description: This is a callback function for the BPy_Lamp type. It */
-/* builds a meaninful string to 'print' lamp objects. */
-/*****************************************************************************/
-static int Lamp_print(BPy_Lamp *self, FILE *fp, int flags)
-{
- fprintf(fp, "[Lamp \"%s\"]", self->lamp->id.name+2);
- return 0;
-}
-
-/*****************************************************************************/
/* Function: Lamp_repr */
/* Description: This is a callback function for the BPy_Lamp type. It */
/* builds a meaninful string to represent lamp objects. */
/*****************************************************************************/
static PyObject *Lamp_repr (BPy_Lamp *self)
{
- return PyString_FromString(self->lamp->id.name+2);
+ return PyString_FromFormat("[Lamp \"%s\"]", self->lamp->id.name+2);
}