diff options
author | Victor Stinner <vstinner@python.org> | 2023-06-30 10:28:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-30 10:28:59 (GMT) |
commit | 80b3d8f337bef52d7c360b4ee86be873681f747a (patch) | |
tree | 5cf0667bbac5e0d67e7551479218f2090ff3f799 /Python | |
parent | f3cf2ddd8ddc7dfa6b06e6da640391a1bcd62b8a (diff) | |
download | cpython-80b3d8f337bef52d7c360b4ee86be873681f747a.zip cpython-80b3d8f337bef52d7c360b4ee86be873681f747a.tar.gz cpython-80b3d8f337bef52d7c360b4ee86be873681f747a.tar.bz2 |
gh-106023: Remove _PyObject_FastCallTstate() function (#106273)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/sysmodule.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 8e3fbe3..56d771f 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -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; |