mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-29548: no longer use PyEval_Call* functions (GH-14683)
This commit is contained in:
parent
9b5ce62cac
commit
1dbd084f1f
4 changed files with 14 additions and 6 deletions
|
@ -457,7 +457,16 @@ PyEval_CallObjectWithKeywords(PyObject *callable,
|
|||
PyObject *
|
||||
PyObject_CallObject(PyObject *callable, PyObject *args)
|
||||
{
|
||||
return PyEval_CallObjectWithKeywords(callable, args, NULL);
|
||||
assert(!PyErr_Occurred());
|
||||
if (args == NULL) {
|
||||
return _PyObject_CallNoArg(callable);
|
||||
}
|
||||
if (!PyTuple_Check(args)) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"argument list must be a tuple");
|
||||
return NULL;
|
||||
}
|
||||
return PyObject_Call(callable, args, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue