Separated some variable declarations from the code, for wider compiler support.
authorYann Vernier <yann@algonet.se>
Sun, 23 Jan 2005 20:15:06 +0000 (20:15 +0000)
committerYann Vernier <yann@algonet.se>
Sun, 23 Jan 2005 20:15:06 +0000 (20:15 +0000)
source/blender/python/api2_2x/Mathutils.c

index 3476279cd41e3fc6313c3d729de1aa2a7c2cdd10..e52997aecd86bb06b81687751d7f8414bcf74a38 100644 (file)
@@ -272,12 +272,14 @@ static PyObject *M_Mathutils_Vector( PyObject * self, PyObject * args )
                goto bad_args;          // Invalid vector size
        }
        for (i=0; i<size; i++) {
-               PyObject *v=PySequence_GetItem(listObject, i);
+               PyObject *v, *f;
+
+               v=PySequence_GetItem(listObject, i);
                if (v==NULL) {
                        Py_DECREF(listObject);
                        return NULL;    // Failed to read sequence
                }
-               PyObject *f=PyNumber_Float(v);
+               f=PyNumber_Float(v);
                if(f==NULL) {
                        Py_DECREF(v);
                        goto bad_args;