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):
277
277
lambda : ((None ,),),
278
278
code = """PyObject* PyLong_FromAndToVoidPtrAllocated(PyObject* none) {
279
279
unsigned long l = 0;
280
+ void* unwrappedPtr;
281
+ PyObject* result;
280
282
void* dummyPtr = malloc(sizeof(size_t));
281
283
PyObject* obj = PyLong_FromVoidPtr(dummyPtr);
282
284
int r = PyObject_RichCompareBool(obj, Py_False, Py_LT);
283
285
if (r < 0) {
284
286
return Py_None;
285
287
}
286
288
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;
289
291
free(dummyPtr);
290
292
return result;
291
293
}
You can’t perform that action at this time.
0 commit comments