Skip to content

Commit 98143bf

Browse files
committed
Fix: ISO C90 compatibility in 'test_misc'.
1 parent 5542114 commit 98143bf

File tree

1 file changed

+3
-2
lines changed
  • graalpython/com.oracle.graal.python.test/src/tests/cpyext

1 file changed

+3
-2
lines changed

graalpython/com.oracle.graal.python.test/src/tests/cpyext/test_misc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,15 @@ def compile_module(self, name):
186186
),
187187
code="""PyObject* PointerEquality_Primitive(PyObject* pyVal, PyObject* fun) {
188188
PyObject** dummyArray = (PyObject**) malloc(sizeof(PyObject*));
189+
PyObject *arg, *result0;
189190
Py_INCREF(pyVal);
190191
Py_INCREF(fun);
191192
dummyArray[0] = pyVal;
192193
193-
PyObject* arg = PyTuple_New(1);
194+
arg = PyTuple_New(1);
194195
PyTuple_SET_ITEM(arg, 0, dummyArray[0]);
195196
Py_INCREF(arg);
196-
PyObject* result0 = PyObject_Call(fun, arg, NULL);
197+
result0 = PyObject_Call(fun, arg, NULL);
197198
if (pyVal != result0) {
198199
PyErr_Format(PyExc_ValueError, "%s is not pointer equal: 0x%lx vs. 0x%lx", PyUnicode_AsUTF8(PyObject_Repr(pyVal)), (void*)pyVal, (void*)result0);
199200
return NULL;

0 commit comments

Comments
 (0)