extracting null pointer address from PyCObject with ctypes
gordallott at gmail.com
Fri Oct 10 23:16:01 CEST 2008
Aaron "Castironpi" Brady wrote:
> I see. If I understand, you have a PyCObject in a dictionary.
> Look at the 'ctypes' module and try calling PyCObject_AsVoidPtr. Its
> return type should be 'c_void_p', and you can use 'result.value' to
> get the original pointer.
I have a hard time following that, if using ctypes you used PyDLL to
call PyCObject_AsVoidPtr on the PyCObject I already have surely it would
give me back a pointer (void for sake of simplicity) but it would be a
pointer to a new PyCObject and thus calling result.value on it would
only return the memory address of the new PyCObject?
Gord Allott (gordallott at gmail.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 260 bytes
Desc: OpenPGP digital signature
More information about the Python-list