diff options
author | Victor Stinner <vstinner@python.org> | 2021-10-11 22:42:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 22:42:23 (GMT) |
commit | ce3489cfdb9f0e050bdc45ce5d3902c2577ea683 (patch) | |
tree | 2493f172e9eddadbd5ca53cb810ddd4971bbcef3 /Objects | |
parent | fb8f208a4ddb38eedee71f9ecd0f22058802dab1 (diff) | |
download | cpython-ce3489cfdb9f0e050bdc45ce5d3902c2577ea683.zip cpython-ce3489cfdb9f0e050bdc45ce5d3902c2577ea683.tar.gz cpython-ce3489cfdb9f0e050bdc45ce5d3902c2577ea683.tar.bz2 |
bpo-45439: Rename _PyObject_CallNoArg() to _PyObject_CallNoArgs() (GH-28891)
Fix typo in the private _PyObject_CallNoArg() function name: rename
it to _PyObject_CallNoArgs() to be consistent with the public
function PyObject_CallNoArgs().
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/abstract.c | 4 | ||||
-rw-r--r-- | Objects/bytesobject.c | 4 | ||||
-rw-r--r-- | Objects/call.c | 8 | ||||
-rw-r--r-- | Objects/complexobject.c | 2 | ||||
-rw-r--r-- | Objects/dictobject.c | 2 | ||||
-rw-r--r-- | Objects/enumobject.c | 2 | ||||
-rw-r--r-- | Objects/fileobject.c | 2 | ||||
-rw-r--r-- | Objects/genobject.c | 2 | ||||
-rw-r--r-- | Objects/iterobject.c | 2 | ||||
-rw-r--r-- | Objects/moduleobject.c | 2 | ||||
-rw-r--r-- | Objects/object.c | 4 | ||||
-rw-r--r-- | Objects/odictobject.c | 6 | ||||
-rw-r--r-- | Objects/typeobject.c | 10 |
13 files changed, 25 insertions, 25 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index c056c66..3312e26 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -114,7 +114,7 @@ PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue) } return defaultvalue; } - result = _PyObject_CallNoArg(hint); + result = _PyObject_CallNoArgs(hint); Py_DECREF(hint); if (result == NULL) { PyThreadState *tstate = _PyThreadState_GET(); @@ -1576,7 +1576,7 @@ PyNumber_Long(PyObject *o) } trunc_func = _PyObject_LookupSpecial(o, &PyId___trunc__); if (trunc_func) { - result = _PyObject_CallNoArg(trunc_func); + result = _PyObject_CallNoArgs(trunc_func); Py_DECREF(trunc_func); if (result == NULL || PyLong_CheckExact(result)) { return result; diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 27f766b..0dfded2 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -572,7 +572,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_CallNoArgs(func); Py_DECREF(func); if (result == NULL) return NULL; @@ -2622,7 +2622,7 @@ bytes_new_impl(PyTypeObject *type, PyObject *x, const char *encoding, integer argument before deferring to PyBytes_FromObject, something PyObject_Bytes doesn't do. */ else if ((func = _PyObject_LookupSpecial(x, &PyId___bytes__)) != NULL) { - bytes = _PyObject_CallNoArg(func); + bytes = _PyObject_CallNoArgs(func); Py_DECREF(func); if (bytes == NULL) return NULL; diff --git a/Objects/call.c b/Objects/call.c index ecf6e68..cfcd422 100644 --- a/Objects/call.c +++ b/Objects/call.c @@ -1,5 +1,5 @@ #include "Python.h" -#include "pycore_call.h" // _PyObject_CallNoArgTstate() +#include "pycore_call.h" // _PyObject_CallNoArgsTstate() #include "pycore_ceval.h" // _PyEval_EvalFrame() #include "pycore_object.h" // _PyObject_GC_TRACK() #include "pycore_pyerrors.h" // _PyErr_Occurred() @@ -110,7 +110,7 @@ PyObject * PyObject_CallNoArgs(PyObject *func) { PyThreadState *tstate = _PyThreadState_GET(); - return _PyObject_CallNoArgTstate(tstate, func); + return _PyObject_CallNoArgsTstate(tstate, func); } @@ -402,7 +402,7 @@ PyObject_CallObject(PyObject *callable, PyObject *args) PyThreadState *tstate = _PyThreadState_GET(); assert(!_PyErr_Occurred(tstate)); if (args == NULL) { - return _PyObject_CallNoArgTstate(tstate, callable); + return _PyObject_CallNoArgsTstate(tstate, callable); } if (!PyTuple_Check(args)) { _PyErr_SetString(tstate, PyExc_TypeError, @@ -468,7 +468,7 @@ _PyObject_CallFunctionVa(PyThreadState *tstate, PyObject *callable, } if (!format || !*format) { - return _PyObject_CallNoArgTstate(tstate, callable); + return _PyObject_CallNoArgsTstate(tstate, callable); } if (is_size_t) { diff --git a/Objects/complexobject.c b/Objects/complexobject.c index f08f03f..ff8fcba 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -284,7 +284,7 @@ try_complex_special_method(PyObject *op) f = _PyObject_LookupSpecial(op, &PyId___complex__); if (f) { - PyObject *res = _PyObject_CallNoArg(f); + PyObject *res = _PyObject_CallNoArgs(f); Py_DECREF(f); if (!res || PyComplex_CheckExact(res)) { return res; diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 824cba94..f883ca7 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -1897,7 +1897,7 @@ _PyDict_FromKeys(PyObject *cls, PyObject *iterable, PyObject *value) PyObject *d; int status; - d = _PyObject_CallNoArg(cls); + d = _PyObject_CallNoArgs(cls); if (d == NULL) return NULL; diff --git a/Objects/enumobject.c b/Objects/enumobject.c index 0ebaf5e..aae7dff 100644 --- a/Objects/enumobject.c +++ b/Objects/enumobject.c @@ -298,7 +298,7 @@ reversed_new_impl(PyTypeObject *type, PyObject *seq) return NULL; } if (reversed_meth != NULL) { - PyObject *res = _PyObject_CallNoArg(reversed_meth); + PyObject *res = _PyObject_CallNoArgs(reversed_meth); Py_DECREF(reversed_meth); return res; } diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 5a2816f..5cb017e8 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -190,7 +190,7 @@ PyObject_AsFileDescriptor(PyObject *o) return -1; } else if (meth != NULL) { - PyObject *fno = _PyObject_CallNoArg(meth); + PyObject *fno = _PyObject_CallNoArgs(meth); Py_DECREF(meth); if (fno == NULL) return -1; diff --git a/Objects/genobject.c b/Objects/genobject.c index 8bd6c8d..8fa04e8 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -319,7 +319,7 @@ gen_close_iter(PyObject *yf) PyErr_WriteUnraisable(yf); } if (meth) { - retval = _PyObject_CallNoArg(meth); + retval = _PyObject_CallNoArgs(meth); Py_DECREF(meth); if (retval == NULL) return -1; diff --git a/Objects/iterobject.c b/Objects/iterobject.c index e493e41..acfc539 100644 --- a/Objects/iterobject.c +++ b/Objects/iterobject.c @@ -217,7 +217,7 @@ calliter_iternext(calliterobject *it) return NULL; } - result = _PyObject_CallNoArg(it->it_callable); + result = _PyObject_CallNoArgs(it->it_callable); if (result != NULL) { int ok; diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index 1c37eb0..f008995 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -866,7 +866,7 @@ module_dir(PyObject *self, PyObject *args) if (PyDict_Check(dict)) { PyObject *dirfunc = _PyDict_GetItemIdWithError(dict, &PyId___dir__); if (dirfunc) { - result = _PyObject_CallNoArg(dirfunc); + result = _PyObject_CallNoArgs(dirfunc); } else if (!PyErr_Occurred()) { result = PyDict_Keys(dict); diff --git a/Objects/object.c b/Objects/object.c index aa84815..d269274 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -560,7 +560,7 @@ PyObject_Bytes(PyObject *v) func = _PyObject_LookupSpecial(v, &PyId___bytes__); if (func != NULL) { - result = _PyObject_CallNoArg(func); + result = _PyObject_CallNoArgs(func); Py_DECREF(func); if (result == NULL) return NULL; @@ -1521,7 +1521,7 @@ _dir_object(PyObject *obj) return NULL; } /* use __dir__ */ - result = _PyObject_CallNoArg(dirfunc); + result = _PyObject_CallNoArgs(dirfunc); Py_DECREF(dirfunc); if (result == NULL) return NULL; diff --git a/Objects/odictobject.c b/Objects/odictobject.c index e5361da..1462a3b 100644 --- a/Objects/odictobject.c +++ b/Objects/odictobject.c @@ -1203,7 +1203,7 @@ odict_copy(register PyODictObject *od, PyObject *Py_UNUSED(ignored)) if (PyODict_CheckExact(od)) od_copy = PyODict_New(); else - od_copy = _PyObject_CallNoArg((PyObject *)Py_TYPE(od)); + od_copy = _PyObject_CallNoArgs((PyObject *)Py_TYPE(od)); if (od_copy == NULL) return NULL; @@ -2221,7 +2221,7 @@ mutablemapping_update_arg(PyObject *self, PyObject *arg) return -1; } if (func != NULL) { - PyObject *keys = _PyObject_CallNoArg(func); + PyObject *keys = _PyObject_CallNoArgs(func); Py_DECREF(func); if (keys == NULL) { return -1; @@ -2253,7 +2253,7 @@ mutablemapping_update_arg(PyObject *self, PyObject *arg) return -1; } if (func != NULL) { - PyObject *items = _PyObject_CallNoArg(func); + PyObject *items = _PyObject_CallNoArgs(func); Py_DECREF(func); if (items == NULL) { return -1; diff --git a/Objects/typeobject.c b/Objects/typeobject.c index a81d071..a73a696 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -1640,7 +1640,7 @@ call_unbound_noarg(int unbound, PyObject *func, PyObject *self) return PyObject_CallOneArg(func, self); } else { - return _PyObject_CallNoArg(func); + return _PyObject_CallNoArgs(func); } } @@ -5019,7 +5019,7 @@ _PyObject_GetState(PyObject *obj, int required) Py_DECREF(slotnames); } else { /* getstate != NULL */ - state = _PyObject_CallNoArg(getstate); + state = _PyObject_CallNoArgs(getstate); Py_DECREF(getstate); if (state == NULL) return NULL; @@ -5044,7 +5044,7 @@ _PyObject_GetNewArguments(PyObject *obj, PyObject **args, PyObject **kwargs) __getnewargs_ex__ on the object. */ getnewargs_ex = _PyObject_LookupSpecial(obj, &PyId___getnewargs_ex__); if (getnewargs_ex != NULL) { - PyObject *newargs = _PyObject_CallNoArg(getnewargs_ex); + PyObject *newargs = _PyObject_CallNoArgs(getnewargs_ex); Py_DECREF(getnewargs_ex); if (newargs == NULL) { return -1; @@ -5097,7 +5097,7 @@ _PyObject_GetNewArguments(PyObject *obj, PyObject **args, PyObject **kwargs) __getnewargs__ instead. */ getnewargs = _PyObject_LookupSpecial(obj, &PyId___getnewargs__); if (getnewargs != NULL) { - *args = _PyObject_CallNoArg(getnewargs); + *args = _PyObject_CallNoArgs(getnewargs); Py_DECREF(getnewargs); if (*args == NULL) { return -1; @@ -5358,7 +5358,7 @@ object___reduce_ex___impl(PyObject *self, int protocol) override = (clsreduce != objreduce); Py_DECREF(clsreduce); if (override) { - res = _PyObject_CallNoArg(reduce); + res = _PyObject_CallNoArgs(reduce); Py_DECREF(reduce); return res; } |