mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
gh-106023: Update code using _PyObject_FastCall() (#106257)
Replace _PyObject_FastCall() calls with PyObject_Vectorcall().
This commit is contained in:
parent
e7bc8d1636
commit
8c5f74fc89
10 changed files with 434 additions and 453 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue