mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[3.8] bpo-36974: separate vectorcall functions for each calling convention (GH-13781) (#14782)
This commit is contained in:
parent
5dab5e7d24
commit
bf8e82f976
10 changed files with 388 additions and 117 deletions
|
@ -206,7 +206,7 @@ PyVectorcall_Call(PyObject *callable, PyObject *tuple, PyObject *kwargs)
|
|||
Py_DECREF(kwnames);
|
||||
}
|
||||
|
||||
return result;
|
||||
return _Py_CheckFunctionResult(callable, result, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
@ -723,25 +723,6 @@ exit:
|
|||
}
|
||||
|
||||
|
||||
PyObject *
|
||||
_PyCFunction_Vectorcall(PyObject *func,
|
||||
PyObject *const *args, size_t nargsf,
|
||||
PyObject *kwnames)
|
||||
{
|
||||
PyObject *result;
|
||||
|
||||
assert(func != NULL);
|
||||
assert(PyCFunction_Check(func));
|
||||
Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
|
||||
|
||||
result = _PyMethodDef_RawFastCallKeywords(((PyCFunctionObject*)func)->m_ml,
|
||||
PyCFunction_GET_SELF(func),
|
||||
args, nargs, kwnames);
|
||||
result = _Py_CheckFunctionResult(func, result, NULL);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *
|
||||
cfunction_call_varargs(PyObject *func, PyObject *args, PyObject *kwargs)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue