[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12810] trunk/blender/source/blender/ python/api2_2x/Lamp.c: Python API

Ken Hughes khughes at pacific.edu
Thu Dec 6 21:15:03 CET 2007


Revision: 12810
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12810
Author:   khughes
Date:     2007-12-06 21:15:03 +0100 (Thu, 06 Dec 2007)

Log Message:
-----------
Python API
----------

Bugfix #7877: fix for lamp.setMode() and lamp.setType(): need to build
tuples instead of just int or float objects.

Modified Paths:
--------------
    trunk/blender/source/blender/python/api2_2x/Lamp.c

Modified: trunk/blender/source/blender/python/api2_2x/Lamp.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/Lamp.c	2007-12-06 19:44:17 UTC (rev 12809)
+++ trunk/blender/source/blender/python/api2_2x/Lamp.c	2007-12-06 20:15:03 UTC (rev 12810)
@@ -1503,7 +1503,7 @@
 
 	/* build tuple, call wrapper */
 
-	arg = PyInt_FromLong( (long)type );
+	arg = Py_BuildValue( "(i)", type );
 	error = EXPP_setterWrapper ( (void *)self, arg, (setter)Lamp_setType );
 	Py_DECREF ( arg );
 	return error;
@@ -1562,7 +1562,7 @@
 
 	/* build tuple, call wrapper */
 
-	value = PyInt_FromLong( (long)flag );
+	value = Py_BuildValue( "(i)", flag );
 	error = EXPP_setterWrapper ( (void *)self, value, (setter)Lamp_setMode );
 	Py_DECREF ( value );
 	return error;





More information about the Bf-blender-cvs mailing list