diff --git a/source/blender/python/api2_2x/gen_utils.h b/source/blender/python/api2_2x/gen_utils.h index a4debf87d35..f9336282eef 100644 --- a/source/blender/python/api2_2x/gen_utils.h +++ b/source/blender/python/api2_2x/gen_utils.h @@ -50,7 +50,13 @@ defined here until we switch to 2.4 */ #ifndef Py_RETURN_NONE -#define Py_RETURN_NONE Py_INCREF( Py_None ); return Py_None +#define Py_RETURN_NONE return Py_BuildValue("O", Py_None) +#endif +#ifndef Py_RETURN_FALSE +#define Py_RETURN_FALSE return PyBool_FromLong(0) +#endif +#ifndef Py_RETURN_TRUE +#define Py_RETURN_TRUE return PyBool_FromLong(1) #endif int EXPP_FloatsAreEqual(float A, float B, int floatSteps);