diff --git a/source/blender/python/api2_2x/Armature.c b/source/blender/python/api2_2x/Armature.c index 6c13f903e10..50f0a4c7bdb 100644 --- a/source/blender/python/api2_2x/Armature.c +++ b/source/blender/python/api2_2x/Armature.c @@ -133,6 +133,7 @@ static PyObject *BonesDict_new(PyTypeObject *type, PyObject *args, PyObject *kwd if (py_BonesDict->editBoneDict == NULL) goto RuntimeError; + py_BonesDict->editDict = NULL; py_BonesDict->editmode_flag = 0; return (PyObject*)py_BonesDict; @@ -523,9 +524,9 @@ static PyObject *Armature_saveChanges(BPy_Armature *self) static PyObject *Armature_getAutoIK(BPy_Armature *self, void *closure) { if (self->armature->flag & ARM_AUTO_IK) - Py_RETURN_TRUE; + return EXPP_incr_ret(Py_True); else - Py_RETURN_FALSE; + return EXPP_incr_ret(Py_False); } //------------------------Armature.autoIK (setter) static int Armature_setAutoIK(BPy_Armature *self, PyObject *value, void *closure) diff --git a/source/blender/python/api2_2x/gen_utils.h b/source/blender/python/api2_2x/gen_utils.h index 5aa2cf5a878..7b64944a6da 100644 --- a/source/blender/python/api2_2x/gen_utils.h +++ b/source/blender/python/api2_2x/gen_utils.h @@ -44,24 +44,6 @@ #define Py_WRAP 1024 #define Py_NEW 2048 -/* - Py_RETURN_NONE - Python 2.4 macro. - defined here until we switch to 2.4 -*/ -#ifndef Py_RETURN_NONE -#define Py_RETURN_NONE Py_INCREF( Py_None ); return Py_None -#endif - -/* more 2.4 macros..? */ -#ifndef Py_RETURN_TRUE -#define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True -#endif - -#ifndef Py_RETURN_FALSE -#define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False -#endif - int EXPP_FloatsAreEqual(float A, float B, int floatSteps); int EXPP_VectorsAreEqual(float *vecA, float *vecB, int size, int floatSteps);