We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7d147fb + 09cf64a commit ff0985bCopy full SHA for ff0985b
1 file changed
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