On Thu, 17 Jan 2019 21:26:06 +1100 Steven D'Aprano <steve at pearwood.info> wrote: > Disclaimer: I'm not a ctypes expert, so I might have this completely > wrong. If so, I apologise for the noise. > > The id() function is documented as returning an abstract ID number. In > CPython, that happens to have been implemented as the address of the > object. > > I understand that the only way to pass the address of an object to > ctypes is to use that id. Is that intentional? Can you explain in detail what you're doing? If you're calling a C API taking a PyObject*, it seems like you should be using ctypes.py_object as argument type specifier. Various examples can be found with Google. Regards Antoine.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4