mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
gh-106023: Remove _PyObject_FastCallTstate() function (#106273)
This commit is contained in:
parent
f3cf2ddd8d
commit
80b3d8f337
3 changed files with 6 additions and 30 deletions
|
@ -979,12 +979,6 @@ static PyObject *
|
|||
call_trampoline(PyThreadState *tstate, PyObject* callback,
|
||||
PyFrameObject *frame, int what, PyObject *arg)
|
||||
{
|
||||
|
||||
PyObject *stack[3];
|
||||
stack[0] = (PyObject *)frame;
|
||||
stack[1] = whatstrings[what];
|
||||
stack[2] = (arg != NULL) ? arg : Py_None;
|
||||
|
||||
/* Discard any previous modifications the frame's fast locals */
|
||||
if (frame->f_fast_as_locals) {
|
||||
if (PyFrame_FastToLocalsWithError(frame) < 0) {
|
||||
|
@ -993,7 +987,11 @@ call_trampoline(PyThreadState *tstate, PyObject* callback,
|
|||
}
|
||||
|
||||
/* call the Python-level function */
|
||||
PyObject *result = _PyObject_FastCallTstate(tstate, callback, stack, 3);
|
||||
if (arg == NULL) {
|
||||
arg = Py_None;
|
||||
}
|
||||
PyObject *args[3] = {(PyObject *)frame, whatstrings[what], arg};
|
||||
PyObject *result = _PyObject_VectorcallTstate(tstate, callback, args, 3, NULL);
|
||||
|
||||
PyFrame_LocalsToFast(frame, 1);
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue