From 9fd569a654ded46901c7f20c5fe080972cbb10d2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 6 Jan 2015 16:42:22 +1100 Subject: PyAPI: add utilities PyTuple_SET_ITEMS, Py_INCREF_RET Setting all values of a tuple is such a common operation that it deserves its own macro. Also added Py_INCREF_RET to avoid confusing use of comma operator. --- source/blender/python/mathutils/mathutils_Euler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/python/mathutils/mathutils_Euler.c') diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c index 1c45d5e88ac..9c0ced39403 100644 --- a/source/blender/python/mathutils/mathutils_Euler.c +++ b/source/blender/python/mathutils/mathutils_Euler.c @@ -31,6 +31,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "../generic/python_utildefines.h" #ifndef MATH_STANDALONE # include "BLI_dynstr.h" @@ -382,7 +383,7 @@ static PyObject *Euler_richcmpr(PyObject *a, PyObject *b, int op) return NULL; } - return Py_INCREF(res), res; + return Py_INCREF_RET(res); } /* ---------------------SEQUENCE PROTOCOLS------------------------ */ -- cgit v1.2.3