bpo-36974: separate vectorcall functions for each calling convention (GH-13781)

This commit is contained in:
Jeroen Demeyer 2019-07-05 14:48:24 +02:00 committed by Petr Viktorin
parent 6e43d07324
commit 0d722f3cd6
10 changed files with 384 additions and 115 deletions

View file

@ -4936,7 +4936,7 @@ trace_call_function(PyThreadState *tstate,
{
PyObject *x;
if (PyCFunction_Check(func)) {
C_TRACE(x, _PyCFunction_Vectorcall(func, args, nargs, kwnames));
C_TRACE(x, _PyObject_Vectorcall(func, args, nargs, kwnames));
return x;
}
else if (Py_TYPE(func) == &PyMethodDescr_Type && nargs > 0) {
@ -4952,9 +4952,9 @@ trace_call_function(PyThreadState *tstate,
if (func == NULL) {
return NULL;
}
C_TRACE(x, _PyCFunction_Vectorcall(func,
args+1, nargs-1,
kwnames));
C_TRACE(x, _PyObject_Vectorcall(func,
args+1, nargs-1,
kwnames));
Py_DECREF(func);
return x;
}