mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-106084: Remove old PyObject call aliases (#106085)
Remove old aliases which were kept backwards compatibility with Python 3.8: * _PyObject_CallMethodNoArgs() * _PyObject_CallMethodOneArg() * _PyObject_CallOneArg() * _PyObject_FastCallDict() * _PyObject_Vectorcall() * _PyObject_VectorcallMethod() * _PyVectorcall_Function() Update code which used these aliases to use new names.
This commit is contained in:
parent
93a970ffbc
commit
00e75a3372
12 changed files with 42 additions and 24 deletions
|
@ -122,7 +122,7 @@ _PyObject_FastCallDictTstate(PyThreadState *tstate, PyObject *callable,
|
|||
assert(nargs == 0 || args != NULL);
|
||||
assert(kwargs == NULL || PyDict_Check(kwargs));
|
||||
|
||||
vectorcallfunc func = _PyVectorcall_Function(callable);
|
||||
vectorcallfunc func = PyVectorcall_Function(callable);
|
||||
if (func == NULL) {
|
||||
/* Use tp_call instead */
|
||||
return _PyObject_MakeTpCall(tstate, callable, args, nargs, kwargs);
|
||||
|
@ -349,7 +349,7 @@ _PyObject_Call(PyThreadState *tstate, PyObject *callable,
|
|||
assert(PyTuple_Check(args));
|
||||
assert(kwargs == NULL || PyDict_Check(kwargs));
|
||||
EVAL_CALL_STAT_INC_IF_FUNCTION(EVAL_CALL_API, callable);
|
||||
vectorcallfunc vector_func = _PyVectorcall_Function(callable);
|
||||
vectorcallfunc vector_func = PyVectorcall_Function(callable);
|
||||
if (vector_func != NULL) {
|
||||
return _PyVectorcall_Call(tstate, vector_func, callable, args, kwargs);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue