Updated usage of METH_X definitions for python 3.

Python 3 requires METH_VARARGS | METH_KEYWORDS, not just METH_KEYWORDS.
This commit is contained in:
Gabe Schwartz
2013-06-10 17:29:36 -04:00
parent bce1b352e7
commit bb209193c9
2 changed files with 2 additions and 2 deletions

View File

@@ -543,7 +543,7 @@ class FuncInfo(object):
p2 = s.rfind(")")
docstring_list = [s[:p1+1] + "[" + s[p1+1:p2] + "]" + s[p2:]]
return Template(' {"$py_funcname", (PyCFunction)$wrap_funcname, METH_KEYWORDS, "$py_docstring"},\n'
return Template(' {"$py_funcname", (PyCFunction)$wrap_funcname, METH_VARARGS | METH_KEYWORDS, "$py_docstring"},\n'
).substitute(py_funcname = self.variants[0].wname, wrap_funcname=self.get_wrapper_name(),
py_docstring = " or ".join(docstring_list))