summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-06 17:46:19 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-12-06 17:46:19 (GMT)
commitf17c3de2635df4f5a51c2cb6b99f3e125af19864 (patch)
tree0ce2ba9e92cf1872d318ea136b4640bd7579666f /Objects/bytesobject.c
parenta5ed5f000aad67d216201d959de4c70b7575309d (diff)
downloadcpython-f17c3de2635df4f5a51c2cb6b99f3e125af19864.zip
cpython-f17c3de2635df4f5a51c2cb6b99f3e125af19864.tar.gz
cpython-f17c3de2635df4f5a51c2cb6b99f3e125af19864.tar.bz2
Use _PyObject_CallNoArg()
Replace: PyObject_CallFunctionObjArgs(callable, NULL) with: _PyObject_CallNoArg(callable)
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 5cdc2ca..0a5c0ae 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_CallFunctionObjArgs(func, NULL);
+ result = _PyObject_CallNoArg(func);
Py_DECREF(func);
if (result == NULL)
return NULL;
@@ -2569,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_CallFunctionObjArgs(func, NULL);
+ new = _PyObject_CallNoArg(func);
Py_DECREF(func);
if (new == NULL)
return NULL;