summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorPetr Viktorin <encukou@gmail.com>2020-02-11 16:46:57 (GMT)
committerGitHub <noreply@github.com>2020-02-11 16:46:57 (GMT)
commitffd9753a944916ced659b2c77aebe66a6c9fbab5 (patch)
treef3469bdca81c102afa811a39dd3eaa9643287e93 /Modules
parentf3e7ea5b8c220cd63101e419d529c8563f9c6115 (diff)
downloadcpython-ffd9753a944916ced659b2c77aebe66a6c9fbab5.zip
cpython-ffd9753a944916ced659b2c77aebe66a6c9fbab5.tar.gz
cpython-ffd9753a944916ced659b2c77aebe66a6c9fbab5.tar.bz2
bpo-39245: Switch to public API for Vectorcall (GH-18460)
The bulk of this patch was generated automatically with: for name in \ PyObject_Vectorcall \ Py_TPFLAGS_HAVE_VECTORCALL \ PyObject_VectorcallMethod \ PyVectorcall_Function \ PyObject_CallOneArg \ PyObject_CallMethodNoArgs \ PyObject_CallMethodOneArg \ ; do echo $name git grep -lwz _$name | xargs -0 sed -i "s/\b_$name\b/$name/g" done old=_PyObject_FastCallDict new=PyObject_VectorcallDict git grep -lwz $old | xargs -0 sed -i "s/\b$old\b/$new/g" and then cleaned up: - Revert changes to in docs & news - Revert changes to backcompat defines in headers - Nudge misaligned comments
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_asynciomodule.c22
-rw-r--r--Modules/_collectionsmodule.c2
-rw-r--r--Modules/_csv.c6
-rw-r--r--Modules/_ctypes/callproc.c8
-rw-r--r--Modules/_elementtree.c16
-rw-r--r--Modules/_functoolsmodule.c4
-rw-r--r--Modules/_io/bufferedio.c30
-rw-r--r--Modules/_io/iobase.c16
-rw-r--r--Modules/_io/stringio.c2
-rw-r--r--Modules/_io/textio.c42
-rw-r--r--Modules/_json.c12
-rw-r--r--Modules/_operator.c2
-rw-r--r--Modules/_pickle.c10
-rw-r--r--Modules/_posixsubprocess.c6
-rw-r--r--Modules/_randommodule.c2
-rw-r--r--Modules/_sqlite/cache.c2
-rw-r--r--Modules/_sqlite/connection.c6
-rw-r--r--Modules/_sqlite/cursor.c2
-rw-r--r--Modules/_sqlite/microprotocols.c6
-rw-r--r--Modules/_sre.c2
-rw-r--r--Modules/_struct.c2
-rw-r--r--Modules/_testcapimodule.c10
-rw-r--r--Modules/_xxtestfuzz/fuzzer.c4
-rw-r--r--Modules/cjkcodecs/cjkcodecs.h2
-rw-r--r--Modules/cjkcodecs/multibytecodec.c2
-rw-r--r--Modules/gcmodule.c2
-rw-r--r--Modules/itertoolsmodule.c8
-rw-r--r--Modules/pyexpat.c2
28 files changed, 115 insertions, 115 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c
index 2e29375..5aea743 100644
--- a/Modules/_asynciomodule.c
+++ b/Modules/_asynciomodule.c
@@ -142,7 +142,7 @@ _is_coroutine(PyObject *coro)
Do this check after 'future_init()'; in case we need to raise
an error, __del__ needs a properly initialized object.
*/
- PyObject *res = _PyObject_CallOneArg(asyncio_iscoroutine_func, coro);
+ PyObject *res = PyObject_CallOneArg(asyncio_iscoroutine_func, coro);
if (res == NULL) {
return -1;
}
@@ -367,7 +367,7 @@ call_soon(PyObject *loop, PyObject *func, PyObject *arg, PyObject *ctx)
}
stack[nargs] = (PyObject *)ctx;
- handle = _PyObject_Vectorcall(callable, stack, nargs, context_kwname);
+ handle = PyObject_Vectorcall(callable, stack, nargs, context_kwname);
Py_DECREF(callable);
}
@@ -1287,7 +1287,7 @@ static PyObject *
_asyncio_Future__repr_info_impl(FutureObj *self)
/*[clinic end generated code: output=fa69e901bd176cfb input=f21504d8e2ae1ca2]*/
{
- return _PyObject_CallOneArg(asyncio_future_repr_info_func, (PyObject *)self);
+ return PyObject_CallOneArg(asyncio_future_repr_info_func, (PyObject *)self);
}
static PyObject *
@@ -1363,7 +1363,7 @@ FutureObj_finalize(FutureObj *fut)
func = _PyObject_GetAttrId(fut->fut_loop, &PyId_call_exception_handler);
if (func != NULL) {
- PyObject *res = _PyObject_CallOneArg(func, context);
+ PyObject *res = PyObject_CallOneArg(func, context);
if (res == NULL) {
PyErr_WriteUnraisable(func);
}
@@ -2126,13 +2126,13 @@ _asyncio_Task_current_task_impl(PyTypeObject *type, PyObject *loop)
Py_DECREF(current_task_func);
return NULL;
}
- ret = _PyObject_CallOneArg(current_task_func, loop);
+ ret = PyObject_CallOneArg(current_task_func, loop);
Py_DECREF(current_task_func);
Py_DECREF(loop);
return ret;
}
else {
- ret = _PyObject_CallOneArg(current_task_func, loop);
+ ret = PyObject_CallOneArg(current_task_func, loop);
Py_DECREF(current_task_func);
return ret;
}
@@ -2168,7 +2168,7 @@ _asyncio_Task_all_tasks_impl(PyTypeObject *type, PyObject *loop)
return NULL;
}
- res = _PyObject_CallOneArg(all_tasks_func, loop);
+ res = PyObject_CallOneArg(all_tasks_func, loop);
Py_DECREF(all_tasks_func);
return res;
}
@@ -2181,7 +2181,7 @@ static PyObject *
_asyncio_Task__repr_info_impl(TaskObj *self)
/*[clinic end generated code: output=6a490eb66d5ba34b input=3c6d051ed3ddec8b]*/
{
- return _PyObject_CallOneArg(asyncio_task_repr_info_func, (PyObject *)self);
+ return PyObject_CallOneArg(asyncio_task_repr_info_func, (PyObject *)self);
}
/*[clinic input]
@@ -2431,7 +2431,7 @@ TaskObj_finalize(TaskObj *task)
func = _PyObject_GetAttrId(task->task_loop, &PyId_call_exception_handler);
if (func != NULL) {
- PyObject *res = _PyObject_CallOneArg(func, context);
+ PyObject *res = PyObject_CallOneArg(func, context);
if (res == NULL) {
PyErr_WriteUnraisable(func);
}
@@ -2571,7 +2571,7 @@ task_set_error_soon(TaskObj *task, PyObject *et, const char *format, ...)
return NULL;
}
- PyObject *e = _PyObject_CallOneArg(et, msg);
+ PyObject *e = PyObject_CallOneArg(et, msg);
Py_DECREF(msg);
if (e == NULL) {
return NULL;
@@ -2841,7 +2841,7 @@ task_step_impl(TaskObj *task, PyObject *exc)
PyObject *stack[2];
stack[0] = wrapper;
stack[1] = (PyObject *)task->task_context;
- res = _PyObject_Vectorcall(add_cb, stack, 1, context_kwname);
+ res = PyObject_Vectorcall(add_cb, stack, 1, context_kwname);
Py_DECREF(add_cb);
Py_DECREF(wrapper);
if (res == NULL) {
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
index 25e4c96..057d404 100644
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -512,7 +512,7 @@ deque_copy(PyObject *deque, PyObject *Py_UNUSED(ignored))
return NULL;
}
if (old_deque->maxlen < 0)
- result = _PyObject_CallOneArg((PyObject *)(Py_TYPE(deque)), deque);
+ result = PyObject_CallOneArg((PyObject *)(Py_TYPE(deque)), deque);
else
result = PyObject_CallFunction((PyObject *)(Py_TYPE(deque)), "Oi",
deque, old_deque->maxlen, NULL);
diff --git a/Modules/_csv.c b/Modules/_csv.c
index 2d541bb..4243772 100644
--- a/Modules/_csv.c
+++ b/Modules/_csv.c
@@ -514,10 +514,10 @@ _call_dialect(PyObject *dialect_inst, PyObject *kwargs)
{
PyObject *type = (PyObject *)&Dialect_Type;
if (dialect_inst) {
- return _PyObject_FastCallDict(type, &dialect_inst, 1, kwargs);
+ return PyObject_VectorcallDict(type, &dialect_inst, 1, kwargs);
}
else {
- return _PyObject_FastCallDict(type, NULL, 0, kwargs);
+ return PyObject_VectorcallDict(type, NULL, 0, kwargs);
}
}
@@ -1240,7 +1240,7 @@ csv_writerow(WriterObj *self, PyObject *seq)
if (line == NULL) {
return NULL;
}
- result = _PyObject_CallOneArg(self->write, line);
+ result = PyObject_CallOneArg(self->write, line);
Py_DECREF(line);
return result;
}
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
index 65c6eb1..5f29f95 100644
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
@@ -945,7 +945,7 @@ static PyObject *GetResult(PyObject *restype, void *result, PyObject *checker)
if (!checker || !retval)
return retval;
- v = _PyObject_CallOneArg(checker, retval);
+ v = PyObject_CallOneArg(checker, retval);
if (v == NULL)
_PyTraceback_Add("GetResult", "_ctypes/callproc.c", __LINE__-2);
Py_DECREF(retval);
@@ -1138,7 +1138,7 @@ PyObject *_ctypes_callproc(PPROC pProc,
if (argtypes && argtype_count > i) {
PyObject *v;
converter = PyTuple_GET_ITEM(argtypes, i);
- v = _PyObject_CallOneArg(converter, arg);
+ v = PyObject_CallOneArg(converter, arg);
if (v == NULL) {
_ctypes_extend_error(PyExc_ArgError, "argument %zd: ", i+1);
goto cleanup;
@@ -1835,7 +1835,7 @@ pointer(PyObject *self, PyObject *arg)
typ = PyDict_GetItemWithError(_ctypes_ptrtype_cache, (PyObject *)Py_TYPE(arg));
if (typ) {
- return _PyObject_CallOneArg(typ, arg);
+ return PyObject_CallOneArg(typ, arg);
}
else if (PyErr_Occurred()) {
return NULL;
@@ -1843,7 +1843,7 @@ pointer(PyObject *self, PyObject *arg)
typ = POINTER(NULL, (PyObject *)Py_TYPE(arg));
if (typ == NULL)
return NULL;
- result = _PyObject_CallOneArg(typ, arg);
+ result = PyObject_CallOneArg(typ, arg);
Py_DECREF(typ);
return result;
}
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
index c096eab..a04b295 100644
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -2671,7 +2671,7 @@ treebuilder_append_event(TreeBuilderObject *self, PyObject *action,
PyObject *event = PyTuple_Pack(2, action, node);
if (event == NULL)
return -1;
- res = _PyObject_CallOneArg(self->events_append, event);
+ res = PyObject_CallOneArg(self->events_append, event);
Py_DECREF(event);
if (res == NULL)
return -1;
@@ -2837,7 +2837,7 @@ treebuilder_handle_comment(TreeBuilderObject* self, PyObject* text)
}
if (self->comment_factory) {
- comment = _PyObject_CallOneArg(self->comment_factory, text);
+ comment = PyObject_CallOneArg(self->comment_factory, text);
if (!comment)
return NULL;
@@ -3179,7 +3179,7 @@ expat_set_error(enum XML_Error error_code, Py_ssize_t line, Py_ssize_t column,
if (errmsg == NULL)
return;
- error = _PyObject_CallOneArg(st->parseerror_obj, errmsg);
+ error = PyObject_CallOneArg(st->parseerror_obj, errmsg);
Py_DECREF(errmsg);
if (!error)
return;
@@ -3242,7 +3242,7 @@ expat_default_handler(XMLParserObject* self, const XML_Char* data_in,
(TreeBuilderObject*) self->target, value
);
else if (self->handle_data)
- res = _PyObject_CallOneArg(self->handle_data, value);
+ res = PyObject_CallOneArg(self->handle_data, value);
else
res = NULL;
Py_XDECREF(res);
@@ -3353,7 +3353,7 @@ expat_data_handler(XMLParserObject* self, const XML_Char* data_in,
/* shortcut */
res = treebuilder_handle_data((TreeBuilderObject*) self->target, data);
else if (self->handle_data)
- res = _PyObject_CallOneArg(self->handle_data, data);
+ res = PyObject_CallOneArg(self->handle_data, data);
else
res = NULL;
@@ -3380,7 +3380,7 @@ expat_end_handler(XMLParserObject* self, const XML_Char* tag_in)
else if (self->handle_end) {
tag = makeuniversal(self, tag_in);
if (tag) {
- res = _PyObject_CallOneArg(self->handle_end, tag);
+ res = PyObject_CallOneArg(self->handle_end, tag);
Py_DECREF(tag);
}
}
@@ -3467,7 +3467,7 @@ expat_end_ns_handler(XMLParserObject* self, const XML_Char* prefix_in)
if (!prefix)
return;
- res = _PyObject_CallOneArg(self->handle_end_ns, prefix);
+ res = PyObject_CallOneArg(self->handle_end_ns, prefix);
Py_DECREF(prefix);
}
@@ -3499,7 +3499,7 @@ expat_comment_handler(XMLParserObject* self, const XML_Char* comment_in)
if (!comment)
return;
- res = _PyObject_CallOneArg(self->handle_comment, comment);
+ res = PyObject_CallOneArg(self->handle_comment, comment);
Py_XDECREF(res);
Py_DECREF(comment);
}
diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c
index 50d8c58..88c02d8 100644
--- a/Modules/_functoolsmodule.c
+++ b/Modules/_functoolsmodule.c
@@ -213,7 +213,7 @@ partial_vectorcall(partialobject *pto, PyObject *const *args,
static void
partial_setvectorcall(partialobject *pto)
{
- if (_PyVectorcall_Function(pto->fn) == NULL) {
+ if (PyVectorcall_Function(pto->fn) == NULL) {
/* Don't use vectorcall if the underlying function doesn't support it */
pto->vectorcall = NULL;
}
@@ -440,7 +440,7 @@ static PyTypeObject partial_type = {
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
Py_TPFLAGS_BASETYPE |
- _Py_TPFLAGS_HAVE_VECTORCALL, /* tp_flags */
+ Py_TPFLAGS_HAVE_VECTORCALL, /* tp_flags */
partial_doc, /* tp_doc */
(traverseproc)partial_traverse, /* tp_traverse */
0, /* tp_clear */
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c
index ddd17a2..6f55577 100644
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -461,7 +461,7 @@ static PyObject *
buffered_simple_flush(buffered *self, PyObject *args)
{
CHECK_INITIALIZED(self)
- return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_flush);
+ return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_flush);
}
static int
@@ -513,7 +513,7 @@ buffered_close(buffered *self, PyObject *args)
}
/* flush() will most probably re-take the lock, so drop it first */
LEAVE_BUFFERED(self)
- res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+ res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
if (!ENTER_BUFFERED(self))
return NULL;
if (res == NULL)
@@ -521,7 +521,7 @@ buffered_close(buffered *self, PyObject *args)
else
Py_DECREF(res);
- res = _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_close);
+ res = PyObject_CallMethodNoArgs(self->raw, _PyIO_str_close);
if (self->buffer) {
PyMem_Free(self->buffer);
@@ -545,7 +545,7 @@ buffered_detach(buffered *self, PyObject *Py_UNUSED(ignored))
{
PyObject *raw, *res;
CHECK_INITIALIZED(self)
- res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+ res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
if (res == NULL)
return NULL;
Py_DECREF(res);
@@ -562,21 +562,21 @@ static PyObject *
buffered_seekable(buffered *self, PyObject *Py_UNUSED(ignored))
{
CHECK_INITIALIZED(self)
- return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_seekable);
+ return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_seekable);
}
static PyObject *
buffered_readable(buffered *self, PyObject *Py_UNUSED(ignored))
{
CHECK_INITIALIZED(self)
- return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_readable);
+ return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_readable);
}
static PyObject *
buffered_writable(buffered *self, PyObject *Py_UNUSED(ignored))
{
CHECK_INITIALIZED(self)
- return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_writable);
+ return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_writable);
}
static PyObject *
@@ -599,14 +599,14 @@ static PyObject *
buffered_fileno(buffered *self, PyObject *Py_UNUSED(ignored))
{
CHECK_INITIALIZED(self)
- return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_fileno);
+ return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_fileno);
}
static PyObject *
buffered_isatty(buffered *self, PyObject *Py_UNUSED(ignored))
{
CHECK_INITIALIZED(self)
- return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_isatty);
+ return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_isatty);
}
/* Forward decls */
@@ -670,7 +670,7 @@ _buffered_raw_tell(buffered *self)
{
Py_off_t n;
PyObject *res;
- res = _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_tell);
+ res = PyObject_CallMethodNoArgs(self->raw, _PyIO_str_tell);
if (res == NULL)
return -1;
n = PyNumber_AsOff_t(res, PyExc_ValueError);
@@ -1324,7 +1324,7 @@ _io__Buffered_truncate_impl(buffered *self, PyObject *pos)
goto end;
Py_CLEAR(res);
}
- res = _PyObject_CallMethodOneArg(self->raw, _PyIO_str_truncate, pos);
+ res = PyObject_CallMethodOneArg(self->raw, _PyIO_str_truncate, pos);
if (res == NULL)
goto end;
/* Reset cached position */
@@ -1351,7 +1351,7 @@ buffered_iternext(buffered *self)
line = _buffered_readline(self, -1);
}
else {
- line = _PyObject_CallMethodNoArgs((PyObject *)self,
+ line = PyObject_CallMethodNoArgs((PyObject *)self,
_PyIO_str_readline);
if (line && !PyBytes_Check(line)) {
PyErr_Format(PyExc_OSError,
@@ -1470,7 +1470,7 @@ _bufferedreader_raw_read(buffered *self, char *start, Py_ssize_t len)
raised (see issue #10956).
*/
do {
- res = _PyObject_CallMethodOneArg(self->raw, _PyIO_str_readinto, memobj);
+ res = PyObject_CallMethodOneArg(self->raw, _PyIO_str_readinto, memobj);
} while (res == NULL && _PyIO_trap_eintr());
Py_DECREF(memobj);
if (res == NULL)
@@ -1569,7 +1569,7 @@ _bufferedreader_read_all(buffered *self)
}
/* Read until EOF or until read() would block. */
- data = _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_read);
+ data = PyObject_CallMethodNoArgs(self->raw, _PyIO_str_read);
if (data == NULL)
goto cleanup;
if (data != Py_None && !PyBytes_Check(data)) {
@@ -1818,7 +1818,7 @@ _bufferedwriter_raw_write(buffered *self, char *start, Py_ssize_t len)
*/
do {
errno = 0;
- res = _PyObject_CallMethodOneArg(self->raw, _PyIO_str_write, memobj);
+ res = PyObject_CallMethodOneArg(self->raw, _PyIO_str_write, memobj);
errnum = errno;
} while (res == NULL && _PyIO_trap_eintr());
Py_DECREF(memobj);
diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c
index d51fc94..1ff3564 100644
--- a/Modules/_io/iobase.c
+++ b/Modules/_io/iobase.c
@@ -235,7 +235,7 @@ _io__IOBase_close_impl(PyObject *self)
Py_RETURN_NONE;
}
- res = _PyObject_CallMethodNoArgs(self, _PyIO_str_flush);
+ res = PyObject_CallMethodNoArgs(self, _PyIO_str_flush);
PyErr_Fetch(&exc, &val, &tb);
rc = _PyObject_SetAttrId(self, &PyId___IOBase_closed, Py_True);
@@ -281,7 +281,7 @@ iobase_finalize(PyObject *self)
finalization process. */
if (_PyObject_SetAttrId(self, &PyId__finalizing, Py_True))
PyErr_Clear();
- res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_close);
+ res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_close);
/* Silencing I/O errors is bad, but printing spurious tracebacks is
equally as bad, and potentially more frequent (because of
shutdown issues). */
@@ -382,7 +382,7 @@ _io__IOBase_seekable_impl(PyObject *self)
PyObject *
_PyIOBase_check_seekable(PyObject *self, PyObject *args)
{
- PyObject *res = _PyObject_CallMethodNoArgs(self, _PyIO_str_seekable);
+ PyObject *res = PyObject_CallMethodNoArgs(self, _PyIO_str_seekable);
if (res == NULL)
return NULL;
if (res != Py_True) {
@@ -415,7 +415,7 @@ _io__IOBase_readable_impl(PyObject *self)
PyObject *
_PyIOBase_check_readable(PyObject *self, PyObject *args)
{
- PyObject *res = _PyObject_CallMethodNoArgs(self, _PyIO_str_readable);
+ PyObject *res = PyObject_CallMethodNoArgs(self, _PyIO_str_readable);
if (res == NULL)
return NULL;
if (res != Py_True) {
@@ -448,7 +448,7 @@ _io__IOBase_writable_impl(PyObject *self)
PyObject *
_PyIOBase_check_writable(PyObject *self, PyObject *args)
{
- PyObject *res = _PyObject_CallMethodNoArgs(self, _PyIO_str_writable);
+ PyObject *res = PyObject_CallMethodNoArgs(self, _PyIO_str_writable);
if (res == NULL)
return NULL;
if (res != Py_True) {
@@ -477,7 +477,7 @@ iobase_enter(PyObject *self, PyObject *args)
static PyObject *
iobase_exit(PyObject *self, PyObject *args)
{
- return _PyObject_CallMethodNoArgs(self, _PyIO_str_close);
+ return PyObject_CallMethodNoArgs(self, _PyIO_str_close);
}
/* Lower-level APIs */
@@ -556,7 +556,7 @@ _io__IOBase_readline_impl(PyObject *self, Py_ssize_t limit)
PyObject *b;
if (peek != NULL) {
- PyObject *readahead = _PyObject_CallOneArg(peek, _PyLong_One);
+ PyObject *readahead = PyObject_CallOneArg(peek, _PyLong_One);
if (readahead == NULL) {
/* NOTE: PyErr_SetFromErrno() calls PyErr_CheckSignals()
when EINTR occurs so we needn't do it ourselves. */
@@ -655,7 +655,7 @@ iobase_iter(PyObject *self)
static PyObject *
iobase_iternext(PyObject *self)
{
- PyObject *line = _PyObject_CallMethodNoArgs(self, _PyIO_str_readline);
+ PyObject *line = PyObject_CallMethodNoArgs(self, _PyIO_str_readline);
if (line == NULL)
return NULL;
diff --git a/Modules/_io/stringio.c b/Modules/_io/stringio.c
index 89b29bb..28d54e0 100644
--- a/Modules/_io/stringio.c
+++ b/Modules/_io/stringio.c
@@ -408,7 +408,7 @@ stringio_iternext(stringio *self)
}
else {
/* XXX is subclassing StringIO really supported? */
- line = _PyObject_CallMethodNoArgs((PyObject *)self,
+ line = PyObject_CallMethodNoArgs((PyObject *)self,
_PyIO_str_readline);
if (line && !PyUnicode_Check(line)) {
PyErr_Format(PyExc_OSError,
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index c4c56cb..1d45c7a 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -527,7 +527,7 @@ _io_IncrementalNewlineDecoder_getstate_impl(nldecoder_object *self)
unsigned long long flag;
if (self->decoder != Py_None) {
- PyObject *state = _PyObject_CallMethodNoArgs(self->decoder,
+ PyObject *state = PyObject_CallMethodNoArgs(self->decoder,
_PyIO_str_getstate);
if (state == NULL)
return NULL;
@@ -601,7 +601,7 @@ _io_IncrementalNewlineDecoder_reset_impl(nldecoder_object *self)
self->seennl = 0;
self->pendingcr = 0;
if (self->decoder != Py_None)
- return _PyObject_CallMethodNoArgs(self->decoder, _PyIO_str_reset);
+ return PyObject_CallMethodNoArgs(self->decoder, _PyIO_str_reset);
else
Py_RETURN_NONE;
}
@@ -963,7 +963,7 @@ _textiowrapper_fix_encoder_state(textio *self)
self->encoding_start_of_stream = 1;
- PyObject *cookieObj = _PyObject_CallMethodNoArgs(
+ PyObject *cookieObj = PyObject_CallMethodNoArgs(
self->buffer, _PyIO_str_tell);
if (cookieObj == NULL) {
return -1;
@@ -977,7 +977,7 @@ _textiowrapper_fix_encoder_state(textio *self)
if (cmp == 0) {
self->encoding_start_of_stream = 0;
- PyObject *res = _PyObject_CallMethodOneArg(
+ PyObject *res = PyObject_CallMethodOneArg(
self->encoder, _PyIO_str_setstate, _PyLong_Zero);
if (res == NULL) {
return -1;
@@ -1386,7 +1386,7 @@ _io_TextIOWrapper_reconfigure_impl(textio *self, PyObject *encoding,
return NULL;
}
- PyObject *res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+ PyObject *res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
if (res == NULL) {
return NULL;
}
@@ -1525,7 +1525,7 @@ _io_TextIOWrapper_detach_impl(textio *self)
{
PyObject *buffer, *res;
CHECK_ATTACHED(self);
- res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+ res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
if (res == NULL)
return NULL;
Py_DECREF(res);
@@ -1597,7 +1597,7 @@ _textiowrapper_writeflush(textio *self)
PyObject *ret;
do {
- ret = _PyObject_CallMethodOneArg(self->buffer, _PyIO_str_write, b);
+ ret = PyObject_CallMethodOneArg(self->buffer, _PyIO_str_write, b);
} while (ret == NULL && _PyIO_trap_eintr());
Py_DECREF(b);
if (ret == NULL)
@@ -1667,7 +1667,7 @@ _io_TextIOWrapper_write_impl(textio *self, PyObject *text)
self->encoding_start_of_stream = 0;
}
else
- b = _PyObject_CallMethodOneArg(self->encoder, _PyIO_str_encode, text);
+ b = PyObject_CallMethodOneArg(self->encoder, _PyIO_str_encode, text);
Py_DECREF(text);
if (b == NULL)
@@ -1718,7 +1718,7 @@ _io_TextIOWrapper_write_impl(textio *self, PyObject *text)
}
if (needflush) {
- ret = _PyObject_CallMethodNoArgs(self->buffer, _PyIO_str_flush);
+ ret = PyObject_CallMethodNoArgs(self->buffer, _PyIO_str_flush);
if (ret == NULL)
return NULL;
Py_DECREF(ret);
@@ -1808,7 +1808,7 @@ textiowrapper_read_chunk(textio *self, Py_ssize_t size_hint)
/* To prepare for tell(), we need to snapshot a point in the file
* where the decoder's input buffer is empty.
*/
- PyObject *state = _PyObject_CallMethodNoArgs(self->decoder,
+ PyObject *state = PyObject_CallMethodNoArgs(self->decoder,
_PyIO_str_getstate);
if (state == NULL)
return -1;
@@ -1849,7 +1849,7 @@ textiowrapper_read_chunk(textio *self, Py_ssize_t size_hint)
if (chunk_size == NULL)
goto fail;
- input_chunk = _PyObject_CallMethodOneArg(self->buffer,
+ input_chunk = PyObject_CallMethodOneArg(self->buffer,
(self->has_read1 ? _PyIO_str_read1: _PyIO_str_read),
chunk_size);
Py_DECREF(chunk_size);
@@ -2393,7 +2393,7 @@ _textiowrapper_decoder_setstate(textio *self, cookie_type *cookie)
utf-16, that we are expecting a BOM).
*/
if (cookie->start_pos == 0 && cookie->dec_flags == 0)
- res = _PyObject_CallMethodNoArgs(self->decoder, _PyIO_str_reset);
+ res = PyObject_CallMethodNoArgs(self->decoder, _PyIO_str_reset);
else
res = _PyObject_CallMethodId(self->decoder, &PyId_setstate,
"((yi))", "", cookie->dec_flags);
@@ -2408,11 +2408,11 @@ _textiowrapper_encoder_reset(textio *self, int start_of_stream)
{
PyObject *res;
if (start_of_stream) {
- res = _PyObject_CallMethodNoArgs(self->encoder, _PyIO_str_reset);
+ res = PyObject_CallMethodNoArgs(self->encoder, _PyIO_str_reset);
self->encoding_start_of_stream = 1;
}
else {
- res = _PyObject_CallMethodOneArg(self->encoder, _PyIO_str_setstate,
+ res = PyObject_CallMethodOneArg(self->encoder, _PyIO_str_setstate,
_PyLong_Zero);
self->encoding_start_of_stream = 0;
}
@@ -2537,7 +2537,7 @@ _io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence)
goto fail;
}
- res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+ res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
if (res == NULL)
goto fail;
Py_DECREF(res);
@@ -2552,7 +2552,7 @@ _io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence)
posobj = PyLong_FromOff_t(cookie.start_pos);
if (posobj == NULL)
goto fail;
- res = _PyObject_CallMethodOneArg(self->buffer, _PyIO_str_seek, posobj);
+ res = PyObject_CallMethodOneArg(self->buffer, _PyIO_str_seek, posobj);
Py_DECREF(posobj);
if (res == NULL)
goto fail;
@@ -2700,14 +2700,14 @@ _io_TextIOWrapper_tell_impl(textio *self)
chars_to_skip = self->decoded_chars_used;
/* Decoder state will be restored at the end */
- saved_state = _PyObject_CallMethodNoArgs(self->decoder,
+ saved_state = PyObject_CallMethodNoArgs(self->decoder,
_PyIO_str_getstate);
if (saved_state == NULL)
goto fail;
#define DECODER_GETSTATE() do { \
PyObject *dec_buffer; \
- PyObject *_state = _PyObject_CallMethodNoArgs(self->decoder, \
+ PyObject *_state = PyObject_CallMethodNoArgs(self->decoder, \
_PyIO_str_getstate); \
if (_state == NULL) \
goto fail; \
@@ -2870,12 +2870,12 @@ _io_TextIOWrapper_truncate_impl(textio *self, PyObject *pos)
CHECK_ATTACHED(self)
- res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+ res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
if (res == NULL)
return NULL;
Py_DECREF(res);
- return _PyObject_CallMethodOneArg(self->buffer, _PyIO_str_truncate, pos);
+ return PyObject_CallMethodOneArg(self->buffer, _PyIO_str_truncate, pos);
}
static PyObject *
@@ -3084,7 +3084,7 @@ textiowrapper_iternext(textio *self)
line = _textiowrapper_readline(self, -1);
}
else {
- line = _PyObject_CallMethodNoArgs((PyObject *)self,
+ line = PyObject_CallMethodNoArgs((PyObject *)self,
_PyIO_str_readline);
if (line && !PyUnicode_Check(line)) {
PyErr_Format(PyExc_OSError,
diff --git a/Modules/_json.c b/Modules/_json.c
index a70043b..ee2070c 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -777,14 +777,14 @@ _parse_object_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ss
*next_idx_ptr = idx + 1;
if (has_pairs_hook) {
- val = _PyObject_CallOneArg(s->object_pairs_hook, rval);
+ val = PyObject_CallOneArg(s->object_pairs_hook, rval);
Py_DECREF(rval);
return val;
}
/* if object_hook is not None: rval = object_hook(rval) */
if (s->object_hook != Py_None) {
- val = _PyObject_CallOneArg(s->object_hook, rval);
+ val = PyObject_CallOneArg(s->object_hook, rval);
Py_DECREF(rval);
return val;
}
@@ -890,7 +890,7 @@ _parse_constant(PyScannerObject *s, const char *constant, Py_ssize_t idx, Py_ssi
return NULL;
/* rval = parse_constant(constant) */
- rval = _PyObject_CallOneArg(s->parse_constant, cstr);
+ rval = PyObject_CallOneArg(s->parse_constant, cstr);
idx += PyUnicode_GET_LENGTH(cstr);
Py_DECREF(cstr);
*next_idx_ptr = idx;
@@ -989,7 +989,7 @@ _match_number_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t start, Py_
idx - start);
if (numstr == NULL)
return NULL;
- rval = _PyObject_CallOneArg(custom_func, numstr);
+ rval = PyObject_CallOneArg(custom_func, numstr);
}
else {
Py_ssize_t i, n;
@@ -1399,7 +1399,7 @@ encoder_encode_string(PyEncoderObject *s, PyObject *obj)
if (s->fast_encode) {
return s->fast_encode(NULL, obj);
}
- encoded = _PyObject_CallOneArg(s->encoder, obj);
+ encoded = PyObject_CallOneArg(s->encoder, obj);
if (encoded != NULL && !PyUnicode_Check(encoded)) {
PyErr_Format(PyExc_TypeError,
"encoder() must return a string, not %.80s",
@@ -1485,7 +1485,7 @@ encoder_listencode_obj(PyEncoderObject *s, _PyAccu *acc,
return -1;
}
}
- newobj = _PyObject_CallOneArg(s->defaultfn, obj);
+ newobj = PyObject_CallOneArg(s->defaultfn, obj);
if (newobj == NULL) {
Py_XDECREF(ident);
return -1;
diff --git a/Modules/_operator.c b/Modules/_operator.c
index 5aa229f..adee5fd 100644
--- a/Modules/_operator.c
+++ b/Modules/_operator.c
@@ -1682,7 +1682,7 @@ methodcaller_reduce(methodcallerobject *mc, PyObject *Py_UNUSED(ignored))
newargs[0] = (PyObject *)Py_TYPE(mc);
newargs[1] = mc->name;
- constructor = _PyObject_FastCallDict(partial, newargs, 2, mc->kwds);
+ constructor = PyObject_VectorcallDict(partial, newargs, 2, mc->kwds);
Py_DECREF(partial);
return Py_BuildValue("NO", constructor, mc->args);
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 5f11fe5..2ba7a16 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -359,7 +359,7 @@ _Pickle_FastCall(PyObject *func, PyObject *obj)
{
PyObject *result;
- result = _PyObject_CallOneArg(func, obj);
+ result = PyObject_CallOneArg(func, obj);
Py_DECREF(obj);
return result;
}
@@ -420,7 +420,7 @@ call_method(PyObject *func, PyObject *self, PyObject *obj)
return PyObject_CallFunctionObjArgs(func, self, obj, NULL);
}
else {
- return _PyObject_CallOneArg(func, obj);
+ return PyObject_CallOneArg(func, obj);
}
}
@@ -2298,7 +2298,7 @@ _Pickler_write_bytes(PicklerObject *self,
return -1;
}
}
- result = _PyObject_CallOneArg(self->write, payload);
+ result = PyObject_CallOneArg(self->write, payload);
Py_XDECREF(mem);
if (result == NULL) {
return -1;
@@ -2506,7 +2506,7 @@ save_picklebuffer(PicklerObject *self, PyObject *obj)
}
int in_band = 1;
if (self->buffer_callback != NULL) {
- PyObject *ret = _PyObject_CallOneArg(self->buffer_callback, obj);
+ PyObject *ret = PyObject_CallOneArg(self->buffer_callback, obj);
if (ret == NULL) {
return -1;
}
@@ -4323,7 +4323,7 @@ save(PicklerObject *self, PyObject *obj, int pers_save)
* regular reduction mechanism.
*/
if (self->reducer_override != NULL) {
- reduce_value = _PyObject_CallOneArg(self->reducer_override, obj);
+ reduce_value = PyObject_CallOneArg(self->reducer_override, obj);
if (reduce_value == NULL) {
goto error;
}
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
index 80bb44d..2aed79e 100644
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -80,7 +80,7 @@ _enable_gc(int need_to_reenable_gc, PyObject *gc_module)
if (need_to_reenable_gc) {
PyErr_Fetch(&exctype, &val, &tb);
- result = _PyObject_CallMethodNoArgs(
+ result = PyObject_CallMethodNoArgs(
gc_module, _posixsubprocessstate_global->enable);
if (exctype != NULL) {
PyErr_Restore(exctype, val, tb);
@@ -657,7 +657,7 @@ subprocess_fork_exec(PyObject* self, PyObject *args)
gc_module = PyImport_ImportModule("gc");
if (gc_module == NULL)
return NULL;
- result = _PyObject_CallMethodNoArgs(
+ result = PyObject_CallMethodNoArgs(
gc_module, _posixsubprocessstate_global->isenabled);
if (result == NULL) {
Py_DECREF(gc_module);
@@ -669,7 +669,7 @@ subprocess_fork_exec(PyObject* self, PyObject *args)
Py_DECREF(gc_module);
return NULL;
}
- result = _PyObject_CallMethodNoArgs(
+ result = PyObject_CallMethodNoArgs(
gc_module, _posixsubprocessstate_global->disable);
if (result == NULL) {
Py_DECREF(gc_module);
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index 1f4bf74..f0fdb03 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -287,7 +287,7 @@ random_seed(RandomObject *self, PyObject *arg)
/* Calling int.__abs__() prevents calling arg.__abs__(), which might
return an invalid value. See issue #31478. */
args[0] = arg;
- n = _PyObject_Vectorcall(_randomstate_global->Long___abs__, args, 0,
+ n = PyObject_Vectorcall(_randomstate_global->Long___abs__, args, 0,
NULL);
}
else {
diff --git a/Modules/_sqlite/cache.c b/Modules/_sqlite/cache.c
index 7552d1b..758fc02 100644
--- a/Modules/_sqlite/cache.c
+++ b/Modules/_sqlite/cache.c
@@ -183,7 +183,7 @@ PyObject* pysqlite_cache_get(pysqlite_Cache* self, PyObject* key)
}
}
- /* We cannot replace this by _PyObject_CallOneArg() since
+ /* We cannot replace this by PyObject_CallOneArg() since
* PyObject_CallFunction() has a special case when using a
* single tuple as argument. */
data = PyObject_CallFunction(self->factory, "O", key);
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 6405166..697295d 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -308,7 +308,7 @@ PyObject* pysqlite_connection_cursor(pysqlite_Connection* self, PyObject* args,
factory = (PyObject*)&pysqlite_CursorType;
}
- cursor = _PyObject_CallOneArg(factory, (PyObject *)self);
+ cursor = PyObject_CallOneArg(factory, (PyObject *)self);
if (cursor == NULL)
return NULL;
if (!PyObject_TypeCheck(cursor, &pysqlite_CursorType)) {
@@ -975,7 +975,7 @@ static void _trace_callback(void* user_arg, const char* statement_string)
py_statement = PyUnicode_DecodeUTF8(statement_string,
strlen(statement_string), "replace");
if (py_statement) {
- ret = _PyObject_CallOneArg((PyObject*)user_arg, py_statement);
+ ret = PyObject_CallOneArg((PyObject*)user_arg, py_statement);
Py_DECREF(py_statement);
}
@@ -1472,7 +1472,7 @@ pysqlite_connection_iterdump(pysqlite_Connection* self, PyObject* args)
goto finally;
}
- retval = _PyObject_CallOneArg(pyfn_iterdump, (PyObject *)self);
+ retval = PyObject_CallOneArg(pyfn_iterdump, (PyObject *)self);
finally:
Py_XDECREF(module);
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
index 06275ec..ab276db 100644
--- a/Modules/_sqlite/cursor.c
+++ b/Modules/_sqlite/cursor.c
@@ -266,7 +266,7 @@ _pysqlite_fetch_one_row(pysqlite_Cursor* self)
item = PyBytes_FromStringAndSize(val_str, nbytes);
if (!item)
goto error;
- converted = _PyObject_CallOneArg(converter, item);
+ converted = PyObject_CallOneArg(converter, item);
Py_DECREF(item);
}
} else {
diff --git a/Modules/_sqlite/microprotocols.c b/Modules/_sqlite/microprotocols.c
index bdcb174..bb0d19f 100644
--- a/Modules/_sqlite/microprotocols.c
+++ b/Modules/_sqlite/microprotocols.c
@@ -92,7 +92,7 @@ pysqlite_microprotocols_adapt(PyObject *obj, PyObject *proto, PyObject *alt)
Py_DECREF(key);
if (adapter) {
Py_INCREF(adapter);
- adapted = _PyObject_CallOneArg(adapter, obj);
+ adapted = PyObject_CallOneArg(adapter, obj);
Py_DECREF(adapter);
return adapted;
}
@@ -105,7 +105,7 @@ pysqlite_microprotocols_adapt(PyObject *obj, PyObject *proto, PyObject *alt)
return NULL;
}
if (adapter) {
- adapted = _PyObject_CallOneArg(adapter, obj);
+ adapted = PyObject_CallOneArg(adapter, obj);
Py_DECREF(adapter);
if (adapted == Py_None) {
@@ -124,7 +124,7 @@ pysqlite_microprotocols_adapt(PyObject *obj, PyObject *proto, PyObject *alt)
return NULL;
}
if (adapter) {
- adapted = _PyObject_CallOneArg(adapter, proto);
+ adapted = PyObject_CallOneArg(adapter, proto);
Py_DECREF(adapter);
if (adapted == Py_None) {
diff --git a/Modules/_sre.c b/Modules/_sre.c
index 6518e98..80c4184 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -1081,7 +1081,7 @@ pattern_subx(PatternObject* self, PyObject* ptemplate, PyObject* string,
match = pattern_new_match(self, &state, 1);
if (!match)
goto error;
- item = _PyObject_CallOneArg(filter, match);
+ item = PyObject_CallOneArg(filter, match);
Py_DECREF(match);
if (!item)
goto error;
diff --git a/Modules/_struct.c b/Modules/_struct.c
index cc536b4..0cdfe26 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -2097,7 +2097,7 @@ cache_struct_converter(PyObject *fmt, PyStructObject **ptr)
return 0;
}
- s_object = _PyObject_CallOneArg(_structmodulestate_global->PyStructType, fmt);
+ s_object = PyObject_CallOneArg(_structmodulestate_global->PyStructType, fmt);
if (s_object != NULL) {
if (PyDict_GET_SIZE(cache) >= MAXCACHE)
PyDict_Clear(cache);
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index e6d3034..eb31a0e 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -4846,7 +4846,7 @@ test_pyobject_fastcalldict(PyObject *self, PyObject *args)
return NULL;
}
- return _PyObject_FastCallDict(func, stack, nargs, kwargs);
+ return PyObject_VectorcallDict(func, stack, nargs, kwargs);
}
@@ -4880,7 +4880,7 @@ test_pyobject_vectorcall(PyObject *self, PyObject *args)
PyErr_SetString(PyExc_TypeError, "kwnames must be None or a tuple");
return NULL;
}
- return _PyObject_Vectorcall(func, stack, nargs, kwnames);
+ return PyObject_Vectorcall(func, stack, nargs, kwnames);
}
@@ -5253,7 +5253,7 @@ meth_fastcall_keywords(PyObject* self, PyObject* const* args,
if (pyargs == NULL) {
return NULL;
}
- PyObject *pykwargs = _PyObject_Vectorcall((PyObject*)&PyDict_Type,
+ PyObject *pykwargs = PyObject_Vectorcall((PyObject*)&PyDict_Type,
args + nargs, 0, kwargs);
return Py_BuildValue("NNN", _null_to_none(self), pyargs, pykwargs);
}
@@ -6133,7 +6133,7 @@ static PyTypeObject MethodDescriptorBase_Type = {
.tp_call = PyVectorcall_Call,
.tp_vectorcall_offset = offsetof(MethodDescriptorObject, vectorcall),
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
- Py_TPFLAGS_METHOD_DESCRIPTOR | _Py_TPFLAGS_HAVE_VECTORCALL,
+ Py_TPFLAGS_METHOD_DESCRIPTOR | Py_TPFLAGS_HAVE_VECTORCALL,
.tp_descr_get = func_descr_get,
};
@@ -6172,7 +6172,7 @@ static PyTypeObject MethodDescriptor2_Type = {
.tp_new = MethodDescriptor2_new,
.tp_call = PyVectorcall_Call,
.tp_vectorcall_offset = offsetof(MethodDescriptor2Object, vectorcall),
- .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | _Py_TPFLAGS_HAVE_VECTORCALL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_VECTORCALL,
};
PyDoc_STRVAR(heapgctype__doc__,
diff --git a/Modules/_xxtestfuzz/fuzzer.c b/Modules/_xxtestfuzz/fuzzer.c
index dae1eae..74ba819 100644
--- a/Modules/_xxtestfuzz/fuzzer.c
+++ b/Modules/_xxtestfuzz/fuzzer.c
@@ -104,7 +104,7 @@ static int fuzz_json_loads(const char* data, size_t size) {
if (input_bytes == NULL) {
return 0;
}
- PyObject* parsed = _PyObject_CallOneArg(json_loads_method, input_bytes);
+ PyObject* parsed = PyObject_CallOneArg(json_loads_method, input_bytes);
if (parsed == NULL) {
/* Ignore ValueError as the fuzzer will more than likely
generate some invalid json and values */
@@ -263,7 +263,7 @@ static int fuzz_sre_match(const char* data, size_t size) {
PyObject* pattern = compiled_patterns[idx];
PyObject* match_callable = PyObject_GetAttrString(pattern, "match");
- PyObject* matches = _PyObject_CallOneArg(match_callable, to_match);
+ PyObject* matches = PyObject_CallOneArg(match_callable, to_match);
Py_XDECREF(matches);
Py_DECREF(match_callable);
diff --git a/Modules/cjkcodecs/cjkcodecs.h b/Modules/cjkcodecs/cjkcodecs.h
index 7ed8365..8f6f880 100644
--- a/Modules/cjkcodecs/cjkcodecs.h
+++ b/Modules/cjkcodecs/cjkcodecs.h
@@ -291,7 +291,7 @@ getcodec(PyObject *self, PyObject *encoding)
if (codecobj == NULL)
return NULL;
- r = _PyObject_CallOneArg(cofunc, codecobj);
+ r = PyObject_CallOneArg(cofunc, codecobj);
Py_DECREF(codecobj);
return r;
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c
index 2dd63a9..3bc07b2 100644
--- a/Modules/cjkcodecs/multibytecodec.c
+++ b/Modules/cjkcodecs/multibytecodec.c
@@ -92,7 +92,7 @@ call_error_callback(PyObject *errors, PyObject *exc)
if (cb == NULL)
return NULL;
- r = _PyObject_CallOneArg(cb, exc);
+ r = PyObject_CallOneArg(cb, exc);
Py_DECREF(cb);
return r;
}
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 5673f60..cf164c1 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -872,7 +872,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
_PyObject_ASSERT(op, callback != NULL);
/* copy-paste of weakrefobject.c's handle_callback() */
- temp = _PyObject_CallOneArg(callback, (PyObject *)wr);
+ temp = PyObject_CallOneArg(callback, (PyObject *)wr);
if (temp == NULL)
PyErr_WriteUnraisable(callback);
else
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 0dafb65..c00c274 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -134,7 +134,7 @@ groupby_step(groupbyobject *gbo)
newkey = newvalue;
Py_INCREF(newvalue);
} else {
- newkey = _PyObject_CallOneArg(gbo->keyfunc, newvalue);
+ newkey = PyObject_CallOneArg(gbo->keyfunc, newvalue);
if (newkey == NULL) {
Py_DECREF(newvalue);
return -1;
@@ -1219,7 +1219,7 @@ dropwhile_next(dropwhileobject *lz)
if (lz->start == 1)
return item;
- good = _PyObject_CallOneArg(lz->func, item);
+ good = PyObject_CallOneArg(lz->func, item);
if (good == NULL) {
Py_DECREF(item);
return NULL;
@@ -1382,7 +1382,7 @@ takewhile_next(takewhileobject *lz)
if (item == NULL)
return NULL;
- good = _PyObject_CallOneArg(lz->func, item);
+ good = PyObject_CallOneArg(lz->func, item);
if (good == NULL) {
Py_DECREF(item);
return NULL;
@@ -3918,7 +3918,7 @@ filterfalse_next(filterfalseobject *lz)
ok = PyObject_IsTrue(item);
} else {
PyObject *good;
- good = _PyObject_CallOneArg(lz->func, item);
+ good = PyObject_CallOneArg(lz->func, item);
if (good == NULL) {
Py_DECREF(item);
return NULL;
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index 9016734..a7f8b50 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -119,7 +119,7 @@ set_error(xmlparseobject *self, enum XML_Error code)
XML_ErrorString(code), lineno, column);
if (buffer == NULL)
return NULL;
- err = _PyObject_CallOneArg(ErrorObject, buffer);
+ err = PyObject_CallOneArg(ErrorObject, buffer);
Py_DECREF(buffer);
if ( err != NULL
&& set_error_attr(err, "code", code)