summaryrefslogtreecommitdiffstats
path: root/Modules/symtablemodule.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-11-14 15:21:40 (GMT)
committerGitHub <noreply@github.com>2022-11-14 15:21:40 (GMT)
commit65dd745f1a343dd80f5e612736f36200631f2840 (patch)
tree2a81bd2f9067811f2b0386a5a60081072fbbfb7e /Modules/symtablemodule.c
parent3e2f7135e6164860b763cf5d0d22b9dc12409767 (diff)
downloadcpython-65dd745f1a343dd80f5e612736f36200631f2840.zip
cpython-65dd745f1a343dd80f5e612736f36200631f2840.tar.gz
cpython-65dd745f1a343dd80f5e612736f36200631f2840.tar.bz2
gh-99300: Use Py_NewRef() in Modules/ directory (#99473)
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in test C files of the Modules/ directory.
Diffstat (limited to 'Modules/symtablemodule.c')
-rw-r--r--Modules/symtablemodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/symtablemodule.c b/Modules/symtablemodule.c
index c25ecc2..4ef1d8c 100644
--- a/Modules/symtablemodule.c
+++ b/Modules/symtablemodule.c
@@ -56,8 +56,7 @@ _symtable_symtable_impl(PyObject *module, PyObject *source,
if (st == NULL) {
return NULL;
}
- t = (PyObject *)st->st_top;
- Py_INCREF(t);
+ t = Py_NewRef(st->st_top);
_PySymtable_Free(st);
return t;
}