Cython 1.1.2 和 const 正确性
我正在尝试使用 Cython 为我的 C 库编写 python 扩展。我创建了一个 setup.py 文件 - 但是当我尝试构建 pxd 和 pyx 文件时,出现错误。
经过一番调查,Cython 似乎无法使用 const 参数来理解函数。每当我删除 const 说明符时,编译都会继续,直到下一个具有 const 参数的函数原型。
这是 Cython 的已知限制 - 还是我错过了一些更基本的东西?
我正在使用 Python 2.6.5 运行 Cython 0.11.2
I am experimenting with Cython to write a python extension for my C library. I have created a setup.py file - but when I try to build my pxd and pyx files, I get an error.
After some investigation, it appears that Cython cannot grok functions with const parameters. Whenever I remove the const specifier, the compilation continues until the next function protype that has a const argument.
Is this a known limitation of Cython - or am I missing something more fundamental?
I am running Cython 0.11.2 with Python 2.6.5
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个已知的限制,Cython 自己的文档中记录了解决方法此处。
This is a known limitation, with workarounds documented in Cython's own documentation here.