Python is passing 32bit pointer address to C functions

前端 未结 4 979
误落风尘
误落风尘 2021-02-15 04:04

I would like to call my C functions within a shared library from Python scripts. Problem arrises when passing pointers, the 64bit addresses seem to be truncated to 32bit address

4条回答
  •  梦如初夏
    2021-02-15 04:43

    Actually, You should set plate.argstype = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int], and then it will be ok to accept the address in c func from python.
    I met the problem and I solved it as what I say.

提交回复
热议问题