diff options
author | Victor Stinner <vstinner@python.org> | 2023-06-30 01:05:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-30 01:05:01 (GMT) |
commit | 8c5f74fc89e35827c52753fe620b32207d537319 (patch) | |
tree | 62a1eba40b01250e97f2c5cd263456b4cb7e734a /Python/pythonrun.c | |
parent | e7bc8d16364bde54487eab349a29d58345e35f28 (diff) | |
download | cpython-8c5f74fc89e35827c52753fe620b32207d537319.zip cpython-8c5f74fc89e35827c52753fe620b32207d537319.tar.gz cpython-8c5f74fc89e35827c52753fe620b32207d537319.tar.bz2 |
gh-106023: Update code using _PyObject_FastCall() (#106257)
Replace _PyObject_FastCall() calls with PyObject_Vectorcall().
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 26e474a..60bf66c 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -834,11 +834,8 @@ _PyErr_PrintEx(PyThreadState *tstate, int set_sys_last_vars) _PyErr_WriteUnraisableMsg("in audit hook", NULL); } if (hook) { - PyObject* stack[3]; - stack[0] = typ; - stack[1] = exc; - stack[2] = tb; - PyObject *result = _PyObject_FastCall(hook, stack, 3); + PyObject* args[3] = {typ, exc, tb}; + PyObject *result = PyObject_Vectorcall(hook, args, 3, NULL); if (result == NULL) { handle_system_exit(); |