]> granicus.if.org Git - python/commitdiff
Make it possible to call instancemethod() with 2 arguments.
authorGuido van Rossum <guido@python.org>
Wed, 9 Apr 2003 19:35:08 +0000 (19:35 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 9 Apr 2003 19:35:08 +0000 (19:35 +0000)
Objects/classobject.c

index 89a3673d96b78ff0132a8e67317180a008500e22..9375e07370756def639f1a4353c294adf3d1076f 100644 (file)
@@ -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)) {