diff options
author | Guido van Rossum <guido@python.org> | 1998-07-08 14:58:16 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-07-08 14:58:16 +0000 |
commit | 7859f87fdbcc0679aa6ed9c181ee3826002ac5ca (patch) | |
tree | 21deb8482707e62cf1b6a4d002c97d12a03eb3c3 /Python | |
parent | bb71ab68f9c376a5cda676fa35713cea34783fc0 (diff) | |
download | cpython-git-7859f87fdbcc0679aa6ed9c181ee3826002ac5ca.tar.gz |
Marc-Andre Lemburg's patch to support instance methods with other
callable objects than regular Pythonm functions as their im_func.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 5 |
1 files changed, 5 insertions, 0 deletions
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)) { |