diff options
| author | Victor Stinner <vstinner@python.org> | 2021-10-12 00:42:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-12 00:42:23 +0200 |
| commit | ce3489cfdb9f0e050bdc45ce5d3902c2577ea683 (patch) | |
| tree | 2493f172e9eddadbd5ca53cb810ddd4971bbcef3 /Modules | |
| parent | fb8f208a4ddb38eedee71f9ecd0f22058802dab1 (diff) | |
| download | cpython-git-ce3489cfdb9f0e050bdc45ce5d3902c2577ea683.tar.gz | |
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 'Modules')
| -rw-r--r-- | Modules/_collectionsmodule.c | 2 | ||||
| -rw-r--r-- | Modules/_ctypes/_ctypes.c | 20 | ||||
| -rw-r--r-- | Modules/_ctypes/callbacks.c | 4 | ||||
| -rw-r--r-- | Modules/_ctypes/cfield.c | 2 | ||||
| -rw-r--r-- | Modules/_ctypes/stgdict.c | 2 | ||||
| -rw-r--r-- | Modules/_functoolsmodule.c | 2 | ||||
| -rw-r--r-- | Modules/_io/bufferedio.c | 2 | ||||
| -rw-r--r-- | Modules/_lsprof.c | 2 | ||||
| -rw-r--r-- | Modules/_sqlite/connection.c | 4 | ||||
| -rw-r--r-- | Modules/_ssl.c | 2 | ||||
| -rw-r--r-- | Modules/_testcapimodule.c | 12 | ||||
| -rw-r--r-- | Modules/itertoolsmodule.c | 2 | ||||
| -rw-r--r-- | Modules/main.c | 2 | ||||
| -rw-r--r-- | Modules/mathmodule.c | 6 | ||||
| -rw-r--r-- | Modules/posixmodule.c | 6 |
15 files changed, 35 insertions, 35 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 01522cd494..8a690b46fa 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -2010,7 +2010,7 @@ defdict_missing(defdictobject *dd, PyObject *key) Py_DECREF(tup); return NULL; } - value = _PyObject_CallNoArg(factory); + value = _PyObject_CallNoArgs(factory); if (value == NULL) return value; if (PyObject_SetItem((PyObject *)dd, key, value) < 0) { diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 1d6358c910..7ff101e571 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -216,7 +216,7 @@ PyDict_SetItemProxy(PyObject *dict, PyObject *key, PyObject *item) PyObject *proxy; int result; - obj = _PyObject_CallNoArg((PyObject *)&DictRemover_Type); + obj = _PyObject_CallNoArgs((PyObject *)&DictRemover_Type); if (obj == NULL) return -1; @@ -506,7 +506,7 @@ StructUnionType_new(PyTypeObject *type, PyObject *args, PyObject *kwds, int isSt return NULL; } - dict = (StgDictObject *)_PyObject_CallNoArg((PyObject *)&PyCStgDict_Type); + dict = (StgDictObject *)_PyObject_CallNoArgs((PyObject *)&PyCStgDict_Type); if (!dict) { Py_DECREF(result); return NULL; @@ -1067,7 +1067,7 @@ PyCPointerType_new(PyTypeObject *type, PyObject *args, PyObject *kwds) stgdict items size, align, length contain info about pointers itself, stgdict->proto has info about the pointed to type! */ - stgdict = (StgDictObject *)_PyObject_CallNoArg( + stgdict = (StgDictObject *)_PyObject_CallNoArgs( (PyObject *)&PyCStgDict_Type); if (!stgdict) return NULL; @@ -1550,7 +1550,7 @@ PyCArrayType_new(PyTypeObject *type, PyObject *args, PyObject *kwds) goto error; } - stgdict = (StgDictObject *)_PyObject_CallNoArg( + stgdict = (StgDictObject *)_PyObject_CallNoArgs( (PyObject *)&PyCStgDict_Type); if (!stgdict) goto error; @@ -2006,7 +2006,7 @@ static PyObject *CreateSwappedType(PyTypeObject *type, PyObject *args, PyObject if (result == NULL) return NULL; - stgdict = (StgDictObject *)_PyObject_CallNoArg( + stgdict = (StgDictObject *)_PyObject_CallNoArgs( (PyObject *)&PyCStgDict_Type); if (!stgdict) { Py_DECREF(result); @@ -2120,7 +2120,7 @@ PyCSimpleType_new(PyTypeObject *type, PyObject *args, PyObject *kwds) goto error; } - stgdict = (StgDictObject *)_PyObject_CallNoArg( + stgdict = (StgDictObject *)_PyObject_CallNoArgs( (PyObject *)&PyCStgDict_Type); if (!stgdict) goto error; @@ -2560,7 +2560,7 @@ PyCFuncPtrType_new(PyTypeObject *type, PyObject *args, PyObject *kwds) PyTypeObject *result; StgDictObject *stgdict; - stgdict = (StgDictObject *)_PyObject_CallNoArg( + stgdict = (StgDictObject *)_PyObject_CallNoArgs( (PyObject *)&PyCStgDict_Type); if (!stgdict) return NULL; @@ -3985,10 +3985,10 @@ _build_callargs(PyCFuncPtrObject *self, PyObject *argtypes, goto error; } if (PyCArrayTypeObject_Check(ob)) - ob = _PyObject_CallNoArg(ob); + ob = _PyObject_CallNoArgs(ob); else /* Create an instance of the pointed-to type */ - ob = _PyObject_CallNoArg(dict->proto); + ob = _PyObject_CallNoArgs(dict->proto); /* XXX Is the following correct any longer? We must not pass a byref() to the array then but @@ -5596,7 +5596,7 @@ cast(void *ptr, PyObject *src, PyObject *ctype) CDataObject *result; if (0 == cast_check_pointertype(ctype)) return NULL; - result = (CDataObject *)_PyObject_CallNoArg(ctype); + result = (CDataObject *)_PyObject_CallNoArgs(ctype); if (result == NULL) return NULL; diff --git a/Modules/_ctypes/callbacks.c b/Modules/_ctypes/callbacks.c index 5a4d1c543f..16afb240a5 100644 --- a/Modules/_ctypes/callbacks.c +++ b/Modules/_ctypes/callbacks.c @@ -187,7 +187,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_CallNoArg(cnv); + CDataObject *obj = (CDataObject *)_PyObject_CallNoArgs(cnv); if (!obj) { PrintError("create argument %zd:\n", i); Py_DECREF(cnv); @@ -572,7 +572,7 @@ long Call_CanUnloadNow(void) return E_FAIL; } - result = _PyObject_CallNoArg(func); + result = _PyObject_CallNoArgs(func); Py_DECREF(func); if (!result) { PyErr_WriteUnraisable(context ? context : Py_None); diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c index ec6feca8b0..2909f2f0f7 100644 --- a/Modules/_ctypes/cfield.c +++ b/Modules/_ctypes/cfield.c @@ -61,7 +61,7 @@ PyCField_FromDesc(PyObject *desc, Py_ssize_t index, #define CONT_BITFIELD 2 #define EXPAND_BITFIELD 3 - self = (CFieldObject *)_PyObject_CallNoArg((PyObject *)&PyCField_Type); + self = (CFieldObject *)_PyObject_CallNoArgs((PyObject *)&PyCField_Type); if (self == NULL) return NULL; dict = PyType_stgdict(desc); diff --git a/Modules/_ctypes/stgdict.c b/Modules/_ctypes/stgdict.c index 747339dee3..d44b54cd55 100644 --- a/Modules/_ctypes/stgdict.c +++ b/Modules/_ctypes/stgdict.c @@ -248,7 +248,7 @@ MakeFields(PyObject *type, CFieldObject *descr, } continue; } - new_descr = (CFieldObject *)_PyObject_CallNoArg((PyObject *)&PyCField_Type); + new_descr = (CFieldObject *)_PyObject_CallNoArgs((PyObject *)&PyCField_Type); if (new_descr == NULL) { Py_DECREF(fdescr); Py_DECREF(fieldlist); diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c index d6dfefdd87..ed60ae3d7e 100644 --- a/Modules/_functoolsmodule.c +++ b/Modules/_functoolsmodule.c @@ -1440,7 +1440,7 @@ static int _functools_exec(PyObject *module) { _functools_state *state = get_functools_state(module); - state->kwd_mark = _PyObject_CallNoArg((PyObject *)&PyBaseObject_Type); + state->kwd_mark = _PyObject_CallNoArgs((PyObject *)&PyBaseObject_Type); if (state->kwd_mark == NULL) { return -1; } diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c index ba966f568b..74d4fb5da7 100644 --- a/Modules/_io/bufferedio.c +++ b/Modules/_io/bufferedio.c @@ -1550,7 +1550,7 @@ _bufferedreader_read_all(buffered *self) goto cleanup; } if (readall) { - tmp = _PyObject_CallNoArg(readall); + tmp = _PyObject_CallNoArgs(readall); Py_DECREF(readall); if (tmp == NULL) goto cleanup; diff --git a/Modules/_lsprof.c b/Modules/_lsprof.c index 703067cc74..0ca3f1e1a2 100644 --- a/Modules/_lsprof.c +++ b/Modules/_lsprof.c @@ -76,7 +76,7 @@ _lsprof_get_state(PyObject *module) static _PyTime_t CallExternalTimer(ProfilerObject *pObj) { - PyObject *o = _PyObject_CallNoArg(pObj->externalTimer); + PyObject *o = _PyObject_CallNoArgs(pObj->externalTimer); if (o == NULL) { PyErr_WriteUnraisable(pObj->externalTimer); return 0; diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 02481d9fbd..a331757562 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -710,7 +710,7 @@ step_callback(sqlite3_context *context, int argc, sqlite3_value **params) if (*aggregate_instance == NULL) { callback_context *ctx = (callback_context *)sqlite3_user_data(context); assert(ctx != NULL); - *aggregate_instance = _PyObject_CallNoArg(ctx->callable); + *aggregate_instance = _PyObject_CallNoArgs(ctx->callable); if (!*aggregate_instance) { set_sqlite_error(context, "user-defined aggregate's '__init__' method raised error"); @@ -1008,7 +1008,7 @@ progress_callback(void *ctx) assert(ctx != NULL); PyObject *callable = ((callback_context *)ctx)->callable; - ret = _PyObject_CallNoArg(callable); + ret = _PyObject_CallNoArgs(callable); if (!ret) { /* abort query if error occurred */ rc = -1; diff --git a/Modules/_ssl.c b/Modules/_ssl.c index fedb35b577..c163ce69d5 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -3773,7 +3773,7 @@ _password_callback(char *buf, int size, int rwflag, void *userdata) } if (pw_info->callable) { - fn_ret = _PyObject_CallNoArg(pw_info->callable); + fn_ret = _PyObject_CallNoArgs(pw_info->callable); if (!fn_ret) { /* TODO: It would be nice to move _ctypes_add_traceback() into the core python API, so we could use it to add a frame here */ diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 4a2907f3f0..775464c2de 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -2866,7 +2866,7 @@ _make_call(void *callable) PyObject *rc; int success; PyGILState_STATE s = PyGILState_Ensure(); - rc = _PyObject_CallNoArg((PyObject *)callable); + rc = _PyObject_CallNoArgs((PyObject *)callable); success = (rc != NULL); Py_XDECREF(rc); PyGILState_Release(s); @@ -2937,7 +2937,7 @@ static int _pending_callback(void *arg) { /* we assume the argument is callable object to which we own a reference */ PyObject *callable = (PyObject *)arg; - PyObject *r = _PyObject_CallNoArg(callable); + PyObject *r = _PyObject_CallNoArgs(callable); Py_DECREF(callable); Py_XDECREF(r); return r != NULL ? 0 : -1; @@ -3729,7 +3729,7 @@ slot_tp_del(PyObject *self) /* Execute __del__ method, if any. */ del = _PyObject_LookupSpecial(self, &PyId___tp_del__); if (del != NULL) { - res = _PyObject_CallNoArg(del); + res = _PyObject_CallNoArgs(del); if (res == NULL) PyErr_WriteUnraisable(del); else @@ -4358,7 +4358,7 @@ temporary_c_thread(void *data) /* Allocate a Python thread state for this thread */ state = PyGILState_Ensure(); - res = _PyObject_CallNoArg(test_c_thread->callback); + res = _PyObject_CallNoArgs(test_c_thread->callback); Py_CLEAR(test_c_thread->callback); if (res == NULL) { @@ -4893,7 +4893,7 @@ check_pyobject_freed_is_freed(PyObject *self, PyObject *Py_UNUSED(args)) #ifdef _Py_ADDRESS_SANITIZER Py_RETURN_NONE; #else - PyObject *op = _PyObject_CallNoArg((PyObject *)&PyBaseObject_Type); + PyObject *op = _PyObject_CallNoArgs((PyObject *)&PyBaseObject_Type); if (op == NULL) { return NULL; } @@ -5271,7 +5271,7 @@ bad_get(PyObject *module, PyObject *const *args, Py_ssize_t nargs) return NULL; } - PyObject *res = _PyObject_CallNoArg(cls); + PyObject *res = _PyObject_CallNoArgs(cls); if (res == NULL) { return NULL; } diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index 0df179673a..d6f898cdbf 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -1058,7 +1058,7 @@ itertools_tee_impl(PyObject *module, PyObject *iterable, Py_ssize_t n) PyTuple_SET_ITEM(result, 0, copyable); for (i = 1; i < n; i++) { - copyable = _PyObject_CallNoArg(copyfunc); + copyable = _PyObject_CallNoArgs(copyfunc); if (copyable == NULL) { Py_DECREF(copyfunc); Py_DECREF(result); diff --git a/Modules/main.c b/Modules/main.c index 2684d23067..39b8c71071 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -457,7 +457,7 @@ pymain_run_interactive_hook(int *exitcode) goto error; } - result = _PyObject_CallNoArg(hook); + result = _PyObject_CallNoArgs(hook); Py_DECREF(hook); if (result == NULL) { goto error; diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 5e9f63f6c6..62aceced43 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -1206,7 +1206,7 @@ math_ceil(PyObject *module, PyObject *number) if (!PyFloat_CheckExact(number)) { PyObject *method = _PyObject_LookupSpecial(number, &PyId___ceil__); if (method != NULL) { - PyObject *result = _PyObject_CallNoArg(method); + PyObject *result = _PyObject_CallNoArgs(method); Py_DECREF(method); return result; } @@ -1275,7 +1275,7 @@ math_floor(PyObject *module, PyObject *number) { PyObject *method = _PyObject_LookupSpecial(number, &PyId___floor__); if (method != NULL) { - PyObject *result = _PyObject_CallNoArg(method); + PyObject *result = _PyObject_CallNoArgs(method); Py_DECREF(method); return result; } @@ -2130,7 +2130,7 @@ math_trunc(PyObject *module, PyObject *x) Py_TYPE(x)->tp_name); return NULL; } - result = _PyObject_CallNoArg(trunc); + result = _PyObject_CallNoArgs(trunc); Py_DECREF(trunc); return result; } diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index bd38bea4c6..01012c181b 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -561,7 +561,7 @@ run_at_forkers(PyObject *lst, int reverse) for (i = 0; i < PyList_GET_SIZE(cpy); i++) { PyObject *func, *res; func = PyList_GET_ITEM(cpy, i); - res = _PyObject_CallNoArg(func); + res = _PyObject_CallNoArgs(func); if (res == NULL) PyErr_WriteUnraisable(func); else @@ -1183,7 +1183,7 @@ path_converter(PyObject *o, void *p) if (NULL == func) { goto error_format; } - res = _PyObject_CallNoArg(func); + res = _PyObject_CallNoArgs(func); Py_DECREF(func); if (NULL == res) { goto error_exit; @@ -14380,7 +14380,7 @@ PyOS_FSPath(PyObject *path) _PyType_Name(Py_TYPE(path))); } - path_repr = _PyObject_CallNoArg(func); + path_repr = _PyObject_CallNoArgs(func); Py_DECREF(func); if (NULL == path_repr) { return NULL; |
