mirror of
https://github.com/python/cpython.git
synced 2025-08-28 04:35:02 +00:00
Marc-Andre Lemburg's patch to support instance methods with other
callable objects than regular Pythonm functions as their im_func.
This commit is contained in:
parent
bb71ab68f9
commit
7859f87fdb
3 changed files with 41 additions and 19 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue