File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
graalpython/com.oracle.graal.python.test/src/tests/cpyext Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -277,15 +277,17 @@ def compile_module(self, name):
277277 lambda : ((None ,),),
278278 code = """PyObject* PyLong_FromAndToVoidPtrAllocated(PyObject* none) {
279279 unsigned long l = 0;
280+ void* unwrappedPtr;
281+ PyObject* result;
280282 void* dummyPtr = malloc(sizeof(size_t));
281283 PyObject* obj = PyLong_FromVoidPtr(dummyPtr);
282284 int r = PyObject_RichCompareBool(obj, Py_False, Py_LT);
283285 if (r < 0) {
284286 return Py_None;
285287 }
286288 l = PyLong_AsUnsignedLong(obj);
287- void* unwrappedPtr = (void*)l;
288- PyObject* result = unwrappedPtr == dummyPtr ? Py_True : Py_False;
289+ unwrappedPtr = (void*)l;
290+ result = unwrappedPtr == dummyPtr ? Py_True : Py_False;
289291 free(dummyPtr);
290292 return result;
291293 }
You can’t perform that action at this time.
0 commit comments