[issue43559] ctypes: Heap Pointer is damaged between C and Python

2021-03-19 Thread Canberk Sönmez
Canberk Sönmez added the comment: Alright, I solved the problem. It was simply a typo: "restypes" instead of "res_types". It didn't cause a problem in Python 3.6 but obviously, something was changed. A nice error message might be nice when setting these attributes. -- resolution: ->

[issue43559] ctypes: Heap Pointer is damaged between C and Python

2021-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: Are you using a 64-bit version of python? What is sys.maxsize? -- nosy: +eric.smith ___ Python tracker ___

[issue43559] ctypes: Heap Pointer is damaged between C and Python

2021-03-19 Thread Canberk Sönmez
New submission from Canberk Sönmez : Please see the SO post: https://stackoverflow.com/questions/66713071/ctypes-heap-pointer-is-damaged-between-c-and-python-linux-x86-64 In summary, when I return a pointer to a heap-allocated memory location from a C function, its most significant 32 bits