From: Christian Heimes Date: Sat, 8 Dec 2007 18:27:16 +0000 (+0000) Subject: Fixed a bug found by Marcin Kowalczyk X-Git-Tag: v3.0a3~329 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9bbac5065e09bc559581205a2b0da60b15803040;p=thirdparty%2FPython%2Fcpython.git Fixed a bug found by Marcin Kowalczyk 'Applying PyMethod_Type to 3 arguments crashes Python 3' --- diff --git a/Objects/classobject.c b/Objects/classobject.c index 5362fbcd6ffe..5500ed51da63 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -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)) {