diff options
author | Victor Stinner <vstinner@python.org> | 2022-11-16 18:34:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-16 18:34:24 +0100 |
commit | 8211cf5d287acfd815b6a7f6471cdf83dcd2bb9b (patch) | |
tree | 510409237622aa30dfc6833602bdde97c578f2bb /Python/pythonrun.c | |
parent | 19c1462e8dca3319c8290e2edcce482bd18cb018 (diff) | |
download | cpython-git-8211cf5d287acfd815b6a7f6471cdf83dcd2bb9b.tar.gz |
gh-99300: Replace Py_INCREF() with Py_NewRef() (#99530)
Replace Py_INCREF() and Py_XINCREF() using a cast with Py_NewRef()
and Py_XNewRef().
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index eead707b54..70872222eb 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -515,8 +515,7 @@ parse_syntax_error(PyObject *err, PyObject **message, PyObject **filename, if (v == Py_None) { Py_DECREF(v); _Py_DECLARE_STR(anon_string, "<string>"); - *filename = &_Py_STR(anon_string); - Py_INCREF(*filename); + *filename = Py_NewRef(&_Py_STR(anon_string)); } else { *filename = v; |