summaryrefslogtreecommitdiffstats
path: root/Objects/bytearrayobject.c
diff options
context:
space:
mode:
authorJeroen Demeyer <J.Demeyer@UGent.be>2019-07-04 10:31:34 (GMT)
committerInada Naoki <songofacandy@gmail.com>2019-07-04 10:31:34 (GMT)
commit196a530e00d88a138973bf9182e013937e293f97 (patch)
tree35443abb5aa148b459f68ae43a18cdbb0627ba76 /Objects/bytearrayobject.c
parent9d40554e0da09a44a8547f3f3a2b9dedfeaf7928 (diff)
downloadcpython-196a530e00d88a138973bf9182e013937e293f97.zip
cpython-196a530e00d88a138973bf9182e013937e293f97.tar.gz
cpython-196a530e00d88a138973bf9182e013937e293f97.tar.bz2
bpo-37483: add _PyObject_CallOneArg() function (#14558)
Diffstat (limited to 'Objects/bytearrayobject.c')
-rw-r--r--Objects/bytearrayobject.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index 1bb19a9..9dd6712 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -89,8 +89,7 @@ _canresize(PyByteArrayObject *self)
PyObject *
PyByteArray_FromObject(PyObject *input)
{
- return PyObject_CallFunctionObjArgs((PyObject *)&PyByteArray_Type,
- input, NULL);
+ return _PyObject_CallOneArg((PyObject *)&PyByteArray_Type, input);
}
static PyObject *
@@ -2018,8 +2017,7 @@ bytearray_fromhex_impl(PyTypeObject *type, PyObject *string)
{
PyObject *result = _PyBytes_FromHex(string, type == &PyByteArray_Type);
if (type != &PyByteArray_Type && result != NULL) {
- Py_SETREF(result, PyObject_CallFunctionObjArgs((PyObject *)type,
- result, NULL));
+ Py_SETREF(result, _PyObject_CallOneArg((PyObject *)type, result));
}
return result;
}