summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-07-08 14:58:16 (GMT)
committerGuido van Rossum <guido@python.org>1998-07-08 14:58:16 (GMT)
commit7859f87fdbcc0679aa6ed9c181ee3826002ac5ca (patch)
tree21deb8482707e62cf1b6a4d002c97d12a03eb3c3 /Python
parentbb71ab68f9c376a5cda676fa35713cea34783fc0 (diff)
downloadcpython-7859f87fdbcc0679aa6ed9c181ee3826002ac5ca.zip
cpython-7859f87fdbcc0679aa6ed9c181ee3826002ac5ca.tar.gz
cpython-7859f87fdbcc0679aa6ed9c181ee3826002ac5ca.tar.bz2
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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 5aed5ff..d81f3fd 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)) {