summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-06-26 06:08:12 (GMT)
committerGitHub <noreply@github.com>2023-06-26 06:08:12 (GMT)
commit00e75a33728cdad7c10088acc36bc55b2f4a0efe (patch)
treec7be67273878a3b655a93f7a3500cff95c20e47f /Python/pythonrun.c
parent93a970ffbce58657cc99305be69e460a11371730 (diff)
downloadcpython-00e75a33728cdad7c10088acc36bc55b2f4a0efe.zip
cpython-00e75a33728cdad7c10088acc36bc55b2f4a0efe.tar.gz
cpython-00e75a33728cdad7c10088acc36bc55b2f4a0efe.tar.bz2
gh-106084: Remove old PyObject call aliases (#106085)
Remove old aliases which were kept backwards compatibility with Python 3.8: * _PyObject_CallMethodNoArgs() * _PyObject_CallMethodOneArg() * _PyObject_CallOneArg() * _PyObject_FastCallDict() * _PyObject_Vectorcall() * _PyObject_VectorcallMethod() * _PyVectorcall_Function() Update code which used these aliases to use new names.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 1ec2144..26e474a 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1565,7 +1565,7 @@ _PyErr_Display(PyObject *file, PyObject *unused, PyObject *value, PyObject *tb)
Py_XDECREF(ctx.seen);
/* Call file.flush() */
- PyObject *res = _PyObject_CallMethodNoArgs(file, &_Py_ID(flush));
+ PyObject *res = PyObject_CallMethodNoArgs(file, &_Py_ID(flush));
if (!res) {
/* Silently ignore file.flush() error */
PyErr_Clear();
@@ -1677,7 +1677,7 @@ flush_io_stream(PyThreadState *tstate, PyObject *name)
{
PyObject *f = _PySys_GetAttr(tstate, name);
if (f != NULL) {
- PyObject *r = _PyObject_CallMethodNoArgs(f, &_Py_ID(flush));
+ PyObject *r = PyObject_CallMethodNoArgs(f, &_Py_ID(flush));
if (r) {
Py_DECREF(r);
}