bpo-37151: remove special case for PyCFunction from PyObject_Call (GH-14684)

bpo-37151: remove special case for PyCFunction from PyObject_Call

Alse, make the undocumented function PyCFunction_Call an alias
of PyObject_Call and deprecate it.
This commit is contained in:
Jeroen Demeyer 2019-09-11 13:01:01 +02:00 committed by Petr Viktorin
parent 2d8d597bb8
commit 7a6873cdb1
6 changed files with 47 additions and 66 deletions

View file

@ -5001,7 +5001,7 @@ do_call_core(PyThreadState *tstate, PyObject *func, PyObject *callargs, PyObject
PyObject *result;
if (PyCFunction_Check(func)) {
C_TRACE(result, PyCFunction_Call(func, callargs, kwdict));
C_TRACE(result, PyObject_Call(func, callargs, kwdict));
return result;
}
else if (Py_TYPE(func) == &PyMethodDescr_Type) {