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-11-09 18:56:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-11-09 18:56:41 +0300
commitd1dbf41f6c5143c349e6ecbe5a2f64e04765d880 (patch)
tree6999278929662e0f1bdc56b27e23337f68294965 /source/blender/python/api2_2x
parent62f8e6fc23557796dd009d5262648a505b3bae9e (diff)
PyTuple_Pack dosnt work with python 2.3 - removed
Diffstat (limited to 'source/blender/python/api2_2x')
-rw-r--r--source/blender/python/api2_2x/Geometry.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/python/api2_2x/Geometry.c b/source/blender/python/api2_2x/Geometry.c
index a3b2bc8b244..f82117205db 100644
--- a/source/blender/python/api2_2x/Geometry.c
+++ b/source/blender/python/api2_2x/Geometry.c
@@ -310,14 +310,9 @@ static PyObject *M_Geometry_ClosestPointOnLine( PyObject * self, PyObject * args
/* do the calculation */
lambda = lambda_cp_line_ex(pt_in, l1, l2, pt_out);
- val1 = newVectorObject(pt_out, 3, Py_NEW);
- val2 = PyFloat_FromDouble(lambda);
-
- ret = PyTuple_Pack(2, val1, val2);
-
- Py_DECREF(val1);
- Py_DECREF(val2);
-
+ PyTuple_New(2);
+ PyTuple_SET_ITEM( ret, 0, newVectorObject(pt_out, 3, Py_NEW) );
+ PyTuple_SET_ITEM( ret, 1, PyFloat_FromDouble(lambda) );
return ret;
}