gh-106023: Update code using _PyObject_FastCall() (#106257)

Replace _PyObject_FastCall() calls with PyObject_Vectorcall().
This commit is contained in:
Victor Stinner 2023-06-30 03:05:01 +02:00 committed by GitHub
parent e7bc8d1636
commit 8c5f74fc89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 434 additions and 453 deletions

View file

@ -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();