diff options
author | Stephen Swaney <sswaney@centurytel.net> | 2006-01-16 20:55:03 +0300 |
---|---|---|
committer | Stephen Swaney <sswaney@centurytel.net> | 2006-01-16 20:55:03 +0300 |
commit | 14cc1192a34869e09f1a790bee39af61e60c01a4 (patch) | |
tree | a3e5738e1665ca35e6d64be535025701ec103a9e | |
parent | c5819fe03fd3a199527ec4d5f3f2a52dafd3d9bb (diff) |
clean up some warnings in bpy code
-rw-r--r-- | source/blender/python/BPY_interface.c | 3 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Bone.c | 8 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Mesh.c | 4 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Pose.c | 12 | ||||
-rw-r--r-- | source/blender/python/api2_2x/constant.c | 2 |
5 files changed, 15 insertions, 14 deletions
diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c index 3cdc0de4f52..529d428692b 100644 --- a/source/blender/python/BPY_interface.c +++ b/source/blender/python/BPY_interface.c @@ -1706,8 +1706,9 @@ static PyObject *reimportText( PyObject *module ) /* if previously compiled, free the object */ /* (can't see how could be NULL, but check just in case) */ - if( text->compiled ) + if( text->compiled ){ Py_DECREF( (PyObject *)text->compiled ); + } /* compile the buffer */ buf = txt_to_buf( text ); diff --git a/source/blender/python/api2_2x/Bone.c b/source/blender/python/api2_2x/Bone.c index 95344e7a960..7e233e5f647 100644 --- a/source/blender/python/api2_2x/Bone.c +++ b/source/blender/python/api2_2x/Bone.c @@ -648,7 +648,7 @@ static PyMethodDef BPy_EditBone_methods[] = { "() - True/False - Bone has a parent"}, {"clearParent", (PyCFunction) EditBone_clearParent, METH_NOARGS, "() - sets the parent to None"}, - {NULL} + {NULL, NULL, 0, NULL} }; ///------------------------tp_getset //This contains methods for attributes that require checking @@ -675,7 +675,7 @@ static PyGetSetDef BPy_EditBone_getset[] = { "The parent bone of this bone", NULL}, {"length", (getter)EditBone_getLength, (setter)EditBone_setLength, "The length of this bone", NULL}, - {NULL} + {NULL, NULL, NULL, NULL,NULL} }; //------------------------tp_repr @@ -1067,7 +1067,7 @@ static PyMethodDef BPy_Bone_methods[] = { "() - True/False - Bone has 1 or more children"}, {"getAllChildren", (PyCFunction) Bone_getAllChildren, METH_NOARGS, "() - All the children for this bone - including children's children"}, - {NULL} + {NULL, NULL, 0, NULL} }; //------------------------tp_getset //This contains methods for attributes that require checking @@ -1096,7 +1096,7 @@ static PyGetSetDef BPy_Bone_getset[] = { "The child bones of this bone", NULL}, {"length", (getter)Bone_getLength, (setter)Bone_setLength, "The length of this bone", NULL}, - {NULL} + {NULL, NULL, NULL, NULL,NULL} }; //------------------------tp_repr //This is the string representation of the object diff --git a/source/blender/python/api2_2x/Mesh.c b/source/blender/python/api2_2x/Mesh.c index 16a3072d0f2..5a5bc3106ab 100644 --- a/source/blender/python/api2_2x/Mesh.c +++ b/source/blender/python/api2_2x/Mesh.c @@ -1420,7 +1420,7 @@ static PyObject *MVertSeq_item( BPy_MVertSeq * self, int i ) "array index out of range" ); return MVert_CreatePyObject( self->mesh, i ); -}; +} /* * retrieve a slice of the vertex list (as a Python list) @@ -1487,7 +1487,7 @@ static int MVertSeq_assign_item( BPy_MVertSeq * self, int i, memcpy( dst, src, sizeof(MVert) ); // mesh_update( self->mesh ); return 0; -}; +} static int MVertSeq_assign_slice( BPy_MVertSeq *self, int low, int high, PyObject *args ) diff --git a/source/blender/python/api2_2x/Pose.c b/source/blender/python/api2_2x/Pose.c index dda0bf90610..577eb1029a3 100644 --- a/source/blender/python/api2_2x/Pose.c +++ b/source/blender/python/api2_2x/Pose.c @@ -104,7 +104,7 @@ static PyMethodDef BPy_PoseBonesDict_methods[] = { "() - Returns the keys the dictionary"}, {"values", (PyCFunction) PoseBonesDict_values, METH_NOARGS, "() - Returns the values from the dictionary"}, - {NULL} + {NULL, NULL, 0, NULL} }; //-----------------(internal) static int PoseBoneMapping_Init(PyObject *dictionary, ListBase *posechannels){ @@ -293,7 +293,7 @@ static PyObject *Pose_update(BPy_Pose *self) static PyMethodDef BPy_Pose_methods[] = { {"update", (PyCFunction) Pose_update, METH_NOARGS, "() - Rebuilds the pose with new values"}, - {NULL} + {NULL, NULL, 0, NULL} }; //------------------ATTRIBUTE IMPLEMENTATIONS--------------------------- //------------------------Pose.bones (getter) @@ -318,7 +318,7 @@ AttributeError: static PyGetSetDef BPy_Pose_getset[] = { {"bones", (getter)Pose_getBoneDict, (setter)Pose_setBoneDict, "The pose's Bone dictionary", NULL}, - {NULL} + {NULL, NULL, NULL, NULL, NULL} }; //------------------------tp_dealloc //This tells how to 'tear-down' our object when ref count hits 0 @@ -527,7 +527,7 @@ AttributeError5: static PyMethodDef BPy_PoseBone_methods[] = { {"insertKey", (PyCFunction) PoseBone_insertKey, METH_VARARGS, "() - insert a key for this pose into an action"}, - {NULL} + {NULL, NULL, 0, NULL} }; //------------------ATTRIBUTE IMPLEMENTATIONS--------------------------- //------------------------PoseBone.name (getter) @@ -784,7 +784,7 @@ static PyGetSetDef BPy_PoseBone_getset[] = { "The pose bone's tail positon", NULL}, //{"constraints", (getter)PoseBone_getConstraints, (setter)PoseBone_setConstraints, // "The list of contraints that pertain to this pose bone", NULL}, - {NULL} + {NULL, NULL, NULL, NULL, NULL} }; //------------------------tp_dealloc //This tells how to 'tear-down' our object when ref count hits 0 @@ -856,7 +856,7 @@ PyTypeObject PoseBone_Type = { //-------------------MODULE METHODS IMPLEMENTATION------------------------ //-------------------MODULE METHODS DEFINITION----------------------------- struct PyMethodDef M_Pose_methods[] = { - {NULL} + {NULL, NULL, 0, NULL} }; //-------------------MODULE INITIALIZATION-------------------------------- PyObject *Pose_Init(void) diff --git a/source/blender/python/api2_2x/constant.c b/source/blender/python/api2_2x/constant.c index 1ebf50ffa55..f28af8efad6 100644 --- a/source/blender/python/api2_2x/constant.c +++ b/source/blender/python/api2_2x/constant.c @@ -90,7 +90,7 @@ static PyMethodDef BPy_constant_methods[] = { "() - Returns the keys the dictionary"}, {"values", (PyCFunction) constant_values, METH_NOARGS, "() - Returns the values from the dictionary"}, - {NULL} + {NULL, NULL, 0, NULL} }; //------------------------mp_length static int constantLength(BPy_constant *self) |