]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixed a bug found by Marcin Kowalczyk
authorChristian Heimes <christian@cheimes.de>
Sat, 8 Dec 2007 18:27:16 +0000 (18:27 +0000)
committerChristian Heimes <christian@cheimes.de>
Sat, 8 Dec 2007 18:27:16 +0000 (18:27 +0000)
'Applying PyMethod_Type to 3 arguments crashes Python 3'

Objects/classobject.c

index 5362fbcd6ffea3f5d03ba1c1a21aaded633c71fb..5500ed51da639cf89799bdf47f7ffbe854eb01ee 100644 (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)) {