【发布时间】:2015-03-04 14:52:23
【问题描述】:
问题描述:
当我调用这样定义的方法时:
static PyMethodDef Parser_methods[] = {
{"read", (PyCFunction)Parser_read, METH_KEYWORDS, "read from input source"},
{NULL, NULL, 0, NULL}
};
static PyObject *
Parser_read(Parser * const self, PyObject * unused0, PyObject * unused1)
{
...
}
我得到:
SystemError: Bad call flags in PyCFunction_Call. METH_OLDARGS is no longer supported!
代码在 Python2 上运行良好,但在 Python3 上崩溃
【问题讨论】:
标签: python c python-c-extension