diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-12-06 17:46:19 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-12-06 17:46:19 (GMT) |
commit | f17c3de2635df4f5a51c2cb6b99f3e125af19864 (patch) | |
tree | 0ce2ba9e92cf1872d318ea136b4640bd7579666f /Modules/_ctypes | |
parent | a5ed5f000aad67d216201d959de4c70b7575309d (diff) | |
download | cpython-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 'Modules/_ctypes')
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 2 | ||||
-rw-r--r-- | Modules/_ctypes/callbacks.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 5048d9c..47d8f56 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -5258,7 +5258,7 @@ cast(void *ptr, PyObject *src, PyObject *ctype) CDataObject *result; if (0 == cast_check_pointertype(ctype)) return NULL; - result = (CDataObject *)PyObject_CallFunctionObjArgs(ctype, NULL); + result = (CDataObject *)_PyObject_CallNoArg(ctype); if (result == NULL) return NULL; diff --git a/Modules/_ctypes/callbacks.c b/Modules/_ctypes/callbacks.c index b958f30..2c57d6b 100644 --- a/Modules/_ctypes/callbacks.c +++ b/Modules/_ctypes/callbacks.c @@ -181,7 +181,7 @@ static void _CallPythonObject(void *mem, */ } else if (dict) { /* Hm, shouldn't we use PyCData_AtAddress() or something like that instead? */ - CDataObject *obj = (CDataObject *)PyObject_CallFunctionObjArgs(cnv, NULL); + CDataObject *obj = (CDataObject *)_PyObject_CallNoArg(cnv); if (!obj) { PrintError("create argument %d:\n", i); Py_DECREF(cnv); |