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 7d147fb commit 09cf64aCopy full SHA for 09cf64a
src/runtime/lpython/lpython.py
@@ -773,10 +773,10 @@ def __repr__(self):
773
return ctypes_c_void_p()
774
775
def cptr_to_u64(cptr):
776
- return ctypes.addressof(cptr)
+ return u64(ctypes.cast(cptr, ctypes.c_void_p).value)
777
778
def u64_to_cptr(ivalue):
779
- return ctypes.c_void_p(ivalue)
+ return ctypes.c_void_p(i64(ivalue))
780
781
def sizeof(arg):
782
return ctypes.sizeof(convert_type_to_ctype(arg))
0 commit comments