get rid of warnings, fix for a refcount error

This commit is contained in:
2009-03-21 16:03:26 +00:00
parent 6ab2d7ad65
commit 935f10dc45
6 changed files with 16 additions and 18 deletions

View File

@@ -62,13 +62,13 @@ static PyObject *CreateGlobalDictionary( bContext *C )
{
PyMethodDef *ml;
static PyMethodDef bpy_prop_meths[] = {
{"FloatProperty", BPy_FloatProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"IntProperty", BPy_IntProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"BoolProperty", BPy_BoolProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"FloatProperty", (PyCFunction)BPy_FloatProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"IntProperty", (PyCFunction)BPy_IntProperty, METH_VARARGS|METH_KEYWORDS, ""},
{"BoolProperty", (PyCFunction)BPy_BoolProperty, METH_VARARGS|METH_KEYWORDS, ""},
{NULL, NULL, 0, NULL}
};
for(ml = &bpy_prop_meths; ml->ml_name; ml++) {
for(ml = bpy_prop_meths; ml->ml_name; ml++) {
PyDict_SetItemString( dict, ml->ml_name, PyCFunction_New(ml, NULL));
}
}