[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54282] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/python: Replaced PyTuple_SetItem by PyTuple_SET_ITEM when creating new tuples.

Tamito Kajiyama rd6t-kjym at asahi-net.or.jp
Sun Feb 3 23:40:11 CET 2013


Revision: 54282
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54282
Author:   kjym3
Date:     2013-02-03 22:40:10 +0000 (Sun, 03 Feb 2013)
Log Message:
-----------
Replaced PyTuple_SetItem by PyTuple_SET_ITEM when creating new tuples.

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp	2013-02-03 17:22:26 UTC (rev 54281)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp	2013-02-03 22:40:10 UTC (rev 54282)
@@ -208,7 +208,7 @@
 	PyObject *py_n;
 
 	PyObject *args = PyTuple_New(1);
-	PyTuple_SetItem( args, 0, PyLong_FromLong(n) );
+	PyTuple_SET_ITEM( args, 0, PyLong_FromLong(n) );
 	py_n =  Nature_Type.tp_new(&Nature_Type, args, NULL);
 	Py_DECREF(args);
 
@@ -235,7 +235,7 @@
 	PyObject *py_mt;
 
 	PyObject *args = PyTuple_New(1);
-	PyTuple_SetItem( args, 0, PyLong_FromLong(n) );
+	PyTuple_SET_ITEM( args, 0, PyLong_FromLong(n) );
 	py_mt = MediumType_Type.tp_new( &MediumType_Type, args, NULL );
 	Py_DECREF(args);
 
@@ -334,7 +334,7 @@
 	PyObject *py_it;
 
 	PyObject *args = PyTuple_New(1);
-	PyTuple_SetItem( args, 0, PyLong_FromLong(i) );
+	PyTuple_SET_ITEM( args, 0, PyLong_FromLong(i) );
 	py_it = IntegrationType_Type.tp_new( &IntegrationType_Type, args, NULL );
 	Py_DECREF(args);
 
@@ -353,8 +353,8 @@
 PyObject * BPy_directedViewEdge_from_directedViewEdge( ViewVertex::directedViewEdge& dve ) {
 	PyObject *py_dve = PyTuple_New(2);
 	
-	PyTuple_SetItem( py_dve, 0, BPy_ViewEdge_from_ViewEdge(*(dve.first)) );
-	PyTuple_SetItem( py_dve, 1, PyBool_from_bool(dve.second) );
+	PyTuple_SET_ITEM( py_dve, 0, BPy_ViewEdge_from_ViewEdge(*(dve.first)) );
+	PyTuple_SET_ITEM( py_dve, 1, PyBool_from_bool(dve.second) );
 	
 	return py_dve;
 }

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp	2013-02-03 17:22:26 UTC (rev 54281)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp	2013-02-03 22:40:10 UTC (rev 54282)
@@ -261,13 +261,13 @@
 	Vec3r e2(info->e2.x(), info->e2.y(), info->e2.z());
 	Vec3r er(info->er.x(), info->er.y(), info->er.z());
 	PyObject *retval = PyTuple_New(7);
-	PyTuple_SetItem( retval, 0, PyFloat_FromDouble(info->K1));
-	PyTuple_SetItem( retval, 2, Vector_from_Vec3r(e1));
-	PyTuple_SetItem( retval, 1, PyFloat_FromDouble(info->K2));
-	PyTuple_SetItem( retval, 3, Vector_from_Vec3r(e2));
-	PyTuple_SetItem( retval, 4, PyFloat_FromDouble(info->Kr));
-	PyTuple_SetItem( retval, 5, Vector_from_Vec3r(er));
-	PyTuple_SetItem( retval, 6, PyFloat_FromDouble(info->dKr));
+	PyTuple_SET_ITEM( retval, 0, PyFloat_FromDouble(info->K1));
+	PyTuple_SET_ITEM( retval, 2, Vector_from_Vec3r(e1));
+	PyTuple_SET_ITEM( retval, 1, PyFloat_FromDouble(info->K2));
+	PyTuple_SET_ITEM( retval, 3, Vector_from_Vec3r(e2));
+	PyTuple_SET_ITEM( retval, 4, PyFloat_FromDouble(info->Kr));
+	PyTuple_SET_ITEM( retval, 5, Vector_from_Vec3r(er));
+	PyTuple_SET_ITEM( retval, 6, PyFloat_FromDouble(info->dKr));
 	return retval;
 }
 




More information about the Bf-blender-cvs mailing list