mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-36974: separate vectorcall functions for each calling convention (GH-13781)
This commit is contained in:
parent
6e43d07324
commit
0d722f3cd6
10 changed files with 384 additions and 115 deletions
|
@ -216,7 +216,7 @@ PyVectorcall_Call(PyObject *callable, PyObject *tuple, PyObject *kwargs)
|
|||
PyObject *result = func(callable, args,
|
||||
nargs | PY_VECTORCALL_ARGUMENTS_OFFSET, kwnames);
|
||||
_PyStack_UnpackDict_Free(args, nargs, kwnames);
|
||||
return result;
|
||||
return _Py_CheckFunctionResult(callable, result, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
@ -625,26 +625,6 @@ exit:
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
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