From: Guido van Rossum Date: Wed, 9 Apr 2003 19:35:08 +0000 (+0000) Subject: Make it possible to call instancemethod() with 2 arguments. X-Git-Tag: v2.3c1~1239 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2fb9fdc96a59984539d49cb45d4f87fe9490a0e1;p=thirdparty%2FPython%2Fcpython.git Make it possible to call instancemethod() with 2 arguments. --- diff --git a/Objects/classobject.c b/Objects/classobject.c index 89a3673d96b7..9375e0737075 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -2197,9 +2197,9 @@ instancemethod_new(PyTypeObject* type, PyObject* args, PyObject *kw) { PyObject *func; PyObject *self; - PyObject *classObj; + PyObject *classObj = NULL; - if (!PyArg_UnpackTuple(args, "instancemethod", 3, 3, + if (!PyArg_UnpackTuple(args, "instancemethod", 2, 3, &func, &self, &classObj)) return NULL; if (!PyCallable_Check(func)) {