Fixed a bug found by Marcin Kowalczyk

'Applying PyMethod_Type to 3 arguments crashes Python 3'
This commit is contained in:
Christian Heimes 2007-12-08 18:27:16 +00:00
parent a33eb06e3b
commit 9bbac5065e

View file

@ -141,7 +141,7 @@ method_new(PyTypeObject* type, PyObject* args, PyObject *kw)
if (!_PyArg_NoKeywords("instancemethod", kw))
return NULL;
if (!PyArg_UnpackTuple(args, "method", 2, 3,
if (!PyArg_UnpackTuple(args, "method", 2, 2,
&func, &self))
return NULL;
if (!PyCallable_Check(func)) {