Fix for a python boolean macro that shouldn't be there.

This commit is contained in:
2005-11-22 19:12:46 +00:00
parent 00f266c651
commit 3489fdcd06
2 changed files with 3 additions and 20 deletions

View File

@@ -133,6 +133,7 @@ static PyObject *BonesDict_new(PyTypeObject *type, PyObject *args, PyObject *kwd
if (py_BonesDict->editBoneDict == NULL) if (py_BonesDict->editBoneDict == NULL)
goto RuntimeError; goto RuntimeError;
py_BonesDict->editDict = NULL;
py_BonesDict->editmode_flag = 0; py_BonesDict->editmode_flag = 0;
return (PyObject*)py_BonesDict; return (PyObject*)py_BonesDict;
@@ -523,9 +524,9 @@ static PyObject *Armature_saveChanges(BPy_Armature *self)
static PyObject *Armature_getAutoIK(BPy_Armature *self, void *closure) static PyObject *Armature_getAutoIK(BPy_Armature *self, void *closure)
{ {
if (self->armature->flag & ARM_AUTO_IK) if (self->armature->flag & ARM_AUTO_IK)
Py_RETURN_TRUE; return EXPP_incr_ret(Py_True);
else else
Py_RETURN_FALSE; return EXPP_incr_ret(Py_False);
} }
//------------------------Armature.autoIK (setter) //------------------------Armature.autoIK (setter)
static int Armature_setAutoIK(BPy_Armature *self, PyObject *value, void *closure) static int Armature_setAutoIK(BPy_Armature *self, PyObject *value, void *closure)

View File

@@ -44,24 +44,6 @@
#define Py_WRAP 1024 #define Py_WRAP 1024
#define Py_NEW 2048 #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_FloatsAreEqual(float A, float B, int floatSteps);
int EXPP_VectorsAreEqual(float *vecA, float *vecB, int size, int floatSteps); int EXPP_VectorsAreEqual(float *vecA, float *vecB, int size, int floatSteps);