4 ms·
Python already has this 'hell of pointers' in the ctypes module. Where `to_ptr(x)` is: ptr = ctypes.pointer(ctypes.py_object(x)) And `ptr.dereference()` is
by compressedgas 5y ago
Python already has this 'hell of pointers' in the ctypes module.
Where `to_ptr(x)` is:
ptr = ctypes.pointer(ctypes.py_object(x))
And `ptr.dereference()` is:
ptr.contents.value