Author: Matti Picus <[email protected]>
Branch: 
Changeset: r70340:e8b425028c7f
Date: 2014-03-31 00:45 +0300
http://bitbucket.org/pypy/pypy/changeset/e8b425028c7f/

Log:    variable declaration must precede usage in c

diff --git a/pypy/module/cpyext/test/test_ndarrayobject.py 
b/pypy/module/cpyext/test/test_ndarrayobject.py
--- a/pypy/module/cpyext/test/test_ndarrayobject.py
+++ b/pypy/module/cpyext/test/test_ndarrayobject.py
@@ -246,9 +246,9 @@
                 ("test_FromAny", "METH_NOARGS",
                 '''
                 npy_intp dims[2] ={2, 3};
-                PyObject * obj1 = PyArray_SimpleNew(2, dims, 1);
+                PyObject * obj2, * obj1 = PyArray_SimpleNew(2, dims, 1);
                 PyArray_FILLWBYTE(obj1, 42);
-                PyObject * obj2 = _PyArray_FromAny(obj1, NULL, 0, 0, 0, NULL);
+                obj2 = _PyArray_FromAny(obj1, NULL, 0, 0, 0, NULL);
                 Py_DECREF(obj1);
                 return obj2;
                 '''
@@ -256,9 +256,9 @@
                  ("test_FromObject", "METH_NOARGS",
                 '''
                 npy_intp dims[2] ={2, 3};
-                PyObject * obj1 = PyArray_SimpleNew(2, dims, 1);
+                PyObject  * obj2, * obj1 = PyArray_SimpleNew(2, dims, 1);
                 PyArray_FILLWBYTE(obj1, 42);
-                PyObject * obj2 = _PyArray_FromObject(obj1, 12, 0, 0);
+                obj2 = _PyArray_FromObject(obj1, 12, 0, 0);
                 Py_DECREF(obj1);
                 return obj2;
                 '''
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to