Python API
authorKen Hughes <khughes@pacific.edu>
Sat, 28 Apr 2007 05:09:09 +0000 (05:09 +0000)
committerKen Hughes <khughes@pacific.edu>
Sat, 28 Apr 2007 05:09:09 +0000 (05:09 +0000)
----------
Draw.c: Fix some gcc warnings
Bone.c: Bone_getAllChildren() was calling EXPP_incr_ret() but not returning
the value

source/blender/python/api2_2x/Bone.c
source/blender/python/api2_2x/Draw.c

index cd2e3bea099c68464f79a4cf5f7b6afa02b4ade8..feb43cc74057b636337a57e4e52f1f48a69911aa 100644 (file)
@@ -915,7 +915,7 @@ static PyObject *Bone_getAllChildren(BPy_Bone *self)
        if (self->bone->childbase.first)
                if (!PyBone_ChildrenAsList(list, &self->bone->childbase))
                        return NULL;
-       EXPP_incr_ret(list);
+       return EXPP_incr_ret(list);
 }
 //------------------ATTRIBUTE IMPLEMENTATIONS-----------------------------
 //------------------------Bone.name (get)
index 9ff57f247f1817cab9c0c289cca3a2b6efc6aa26..331415dc849a175fd4094652e4d44a09b0f59c28 100644 (file)
@@ -735,11 +735,13 @@ void BPY_spacescript_do_pywin_event( SpaceScript * sc, unsigned short event,
        }
 }
 
-static void exec_but_callback(PyObject *callback, uiBut *but)
+static void exec_but_callback(void *pyobj, void *data)
 {
        PyObject *result;
        PyObject * pyvalue;
+       uiBut *but = (uiBut *)data;
        PyObject *arg = PyTuple_New( 2 );
+       PyObject *callback = (PyObject *)pyobj;
        
        double value = ui_get_but_val(but);