clean up some warnings in bpy code

This commit is contained in:
Stephen Swaney 2006-01-16 17:55:03 +00:00
parent c5819fe03f
commit 14cc1192a3
5 changed files with 15 additions and 14 deletions

@ -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 );

@ -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

@ -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 )

@ -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)

@ -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)