diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-22 11:02:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-22 11:10:57 +0300 |
commit | 691ed21842397e52445fa8368fa81d757ba66123 (patch) | |
tree | 4270a707b23291e47135e6a65a65b0ac83670806 /source/blender/python/mathutils/mathutils_geometry.c | |
parent | 049932c4c3b5b833df7e8b6be777d641d73a99f7 (diff) |
PyAPI: replace PyC_FromArray with typed functions
This was meant to be generic but introduced possible type errors
and unnecessary complication.
Replace with typed PyC_Tuple_PackArray_* functions.
Also add PyC_Tuple_Pack_* macro which replaces some uses of
Py_BuildValue, with the advantage of not having to parse a string.
Diffstat (limited to 'source/blender/python/mathutils/mathutils_geometry.c')
-rw-r--r-- | source/blender/python/mathutils/mathutils_geometry.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c index 868e4b38408..1dc18dbe509 100644 --- a/source/blender/python/mathutils/mathutils_geometry.c +++ b/source/blender/python/mathutils/mathutils_geometry.c @@ -1279,7 +1279,7 @@ static PyObject *M_Geometry_tessellate_polygon(PyObject *UNUSED(self), PyObject index = 0; dl_face = dl->index; while (index < dl->parts) { - PyList_SET_ITEM(tri_list, index, Py_BuildValue("iii", dl_face[0], dl_face[1], dl_face[2])); + PyList_SET_ITEM(tri_list, index, PyC_Tuple_Pack_I32(dl_face[0], dl_face[1], dl_face[2])); dl_face += 3; index++; } |