diff options
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/errors.c b/Python/errors.c index b3b9ac9..a7d40c1 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -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); |