Abort when passing Python CTypes struct containing array of 3 ints

扶醉桌前 提交于 2019-12-06 15:19:23

This seems to be a bug in libffi (which is what ctypes uses) that only occurs, if you pass a struct by value and that struct is between 9-16 bytes long: https://bugs.python.org/issue22273

I'm able to reproduce this on python 2.7. Try increasing the size of the struct or use a pointer parameter for the methods.

Unfortunately it seems that this is not fixed until now

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!