We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81c1168 commit 18a1816Copy full SHA for 18a1816
graalpython/com.oracle.graal.python.test/src/tests/cpyext/test_long.py
@@ -276,13 +276,14 @@ def compile_module(self, name):
276
lambda args: True,
277
lambda: ((None,),),
278
code="""PyObject* PyLong_FromAndToVoidPtrAllocated(PyObject* none) {
279
+ unsigned long l = 0;
280
void* dummyPtr = malloc(sizeof(size_t));
281
PyObject* obj = PyLong_FromVoidPtr(dummyPtr);
282
int r = PyObject_RichCompareBool(obj, Py_False, Py_LT);
283
if (r < 0) {
284
return Py_None;
285
}
- unsigned long l = PyLong_AsUnsignedLong(obj);
286
+ l = PyLong_AsUnsignedLong(obj);
287
void* unwrappedPtr = (void*)l;
288
PyObject* result = unwrappedPtr == dummyPtr ? Py_True : Py_False;
289
free(dummyPtr);
0 commit comments