mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
bpo-37483: add _PyObject_CallOneArg() function (#14558)
This commit is contained in:
parent
9d40554e0d
commit
196a530e00
44 changed files with 128 additions and 146 deletions
|
@ -93,7 +93,7 @@ _PyErr_CreateException(PyObject *exception, PyObject *value)
|
|||
return PyObject_Call(exception, value, NULL);
|
||||
}
|
||||
else {
|
||||
return PyObject_CallFunctionObjArgs(exception, value, NULL);
|
||||
return _PyObject_CallOneArg(exception, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1381,8 +1381,7 @@ _PyErr_WriteUnraisableMsg(const char *err_msg_str, PyObject *obj)
|
|||
hook_args = make_unraisable_hook_args(tstate, exc_type, exc_value,
|
||||
exc_tb, err_msg, obj);
|
||||
if (hook_args != NULL) {
|
||||
PyObject *args[1] = {hook_args};
|
||||
PyObject *res = _PyObject_FastCall(hook, args, 1);
|
||||
PyObject *res = _PyObject_CallOneArg(hook, hook_args);
|
||||
Py_DECREF(hook_args);
|
||||
if (res != NULL) {
|
||||
Py_DECREF(res);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue