From 7859f87fdbcc0679aa6ed9c181ee3826002ac5ca Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 8 Jul 1998 14:58:16 +0000 Subject: Marc-Andre Lemburg's patch to support instance methods with other callable objects than regular Pythonm functions as their im_func. --- Python/ceval.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Python') diff --git a/Python/ceval.c b/Python/ceval.c index 5aed5ff8af..d81f3fd8d9 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2432,6 +2432,11 @@ call_function(func, arg, kw) } arg = newarg; } + if (!PyFunction_Check(func)) { + result = PyEval_CallObjectWithKeywords(func, arg, kw); + Py_DECREF(arg); + return result; + } } else { if (!PyFunction_Check(func)) { -- cgit v1.2.1