mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +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
|
@ -4248,7 +4248,7 @@ unicode_decode_call_errorhandler_wchar(
|
|||
if (*exceptionObject == NULL)
|
||||
goto onError;
|
||||
|
||||
restuple = PyObject_CallFunctionObjArgs(*errorHandler, *exceptionObject, NULL);
|
||||
restuple = _PyObject_CallOneArg(*errorHandler, *exceptionObject);
|
||||
if (restuple == NULL)
|
||||
goto onError;
|
||||
if (!PyTuple_Check(restuple)) {
|
||||
|
@ -4352,7 +4352,7 @@ unicode_decode_call_errorhandler_writer(
|
|||
if (*exceptionObject == NULL)
|
||||
goto onError;
|
||||
|
||||
restuple = PyObject_CallFunctionObjArgs(*errorHandler, *exceptionObject, NULL);
|
||||
restuple = _PyObject_CallOneArg(*errorHandler, *exceptionObject);
|
||||
if (restuple == NULL)
|
||||
goto onError;
|
||||
if (!PyTuple_Check(restuple)) {
|
||||
|
@ -6799,8 +6799,7 @@ unicode_encode_call_errorhandler(const char *errors,
|
|||
if (*exceptionObject == NULL)
|
||||
return NULL;
|
||||
|
||||
restuple = PyObject_CallFunctionObjArgs(
|
||||
*errorHandler, *exceptionObject, NULL);
|
||||
restuple = _PyObject_CallOneArg(*errorHandler, *exceptionObject);
|
||||
if (restuple == NULL)
|
||||
return NULL;
|
||||
if (!PyTuple_Check(restuple)) {
|
||||
|
@ -8778,8 +8777,7 @@ unicode_translate_call_errorhandler(const char *errors,
|
|||
if (*exceptionObject == NULL)
|
||||
return NULL;
|
||||
|
||||
restuple = PyObject_CallFunctionObjArgs(
|
||||
*errorHandler, *exceptionObject, NULL);
|
||||
restuple = _PyObject_CallOneArg(*errorHandler, *exceptionObject);
|
||||
if (restuple == NULL)
|
||||
return NULL;
|
||||
if (!PyTuple_Check(restuple)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue