diff options
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r-- | Objects/bytesobject.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index b82945ab1d..5cdc2ca30e 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -549,7 +549,7 @@ format_obj(PyObject *v, const char **pbuf, Py_ssize_t *plen) /* does it support __bytes__? */ func = _PyObject_LookupSpecial(v, &PyId___bytes__); if (func != NULL) { - result = _PyObject_CallNoArg(func); + result = PyObject_CallFunctionObjArgs(func, NULL); Py_DECREF(func); if (result == NULL) return NULL; @@ -2331,7 +2331,8 @@ bytes_fromhex_impl(PyTypeObject *type, PyObject *string) { PyObject *result = _PyBytes_FromHex(string, 0); if (type != &PyBytes_Type && result != NULL) { - Py_SETREF(result, _PyObject_CallArg1((PyObject *)type, result)); + Py_SETREF(result, PyObject_CallFunctionObjArgs((PyObject *)type, + result, NULL)); } return result; } @@ -2568,7 +2569,7 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwds) PyObject_Bytes doesn't do. */ func = _PyObject_LookupSpecial(x, &PyId___bytes__); if (func != NULL) { - new = _PyObject_CallNoArg(func); + new = PyObject_CallFunctionObjArgs(func, NULL); Py_DECREF(func); if (new == NULL) return NULL; |