summaryrefslogtreecommitdiffstats
path: root/Modules/symtablemodule.c
diff options
context:
space:
mode:
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;
}