summaryrefslogtreecommitdiffstats
path: root/Modules/gcmodule.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-05-06 19:15:57 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-05-06 19:15:57 (GMT)
commit5f454a07a054eb0db7499d8dbd537ff8ce7bda18 (patch)
tree08557fde41d4a25d1961b38face3ca46bb8c695d /Modules/gcmodule.c
parent1df37c657d7b32cfc7e765f13323415ef1c5be31 (diff)
downloadcpython-5f454a07a054eb0db7499d8dbd537ff8ce7bda18.zip
cpython-5f454a07a054eb0db7499d8dbd537ff8ce7bda18.tar.gz
cpython-5f454a07a054eb0db7499d8dbd537ff8ce7bda18.tar.bz2
Issue #1545463: Global variables caught in reference cycles are now garbage-collected at shutdown.
Diffstat (limited to 'Modules/gcmodule.c')
-rw-r--r--Modules/gcmodule.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 9ac594f..c9c1252 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -1544,8 +1544,9 @@ PyGC_Collect(void)
return n;
}
+
void
-_PyGC_Fini(void)
+_PyGC_DumpShutdownStats(void)
{
if (!(debug & DEBUG_SAVEALL)
&& garbage != NULL && PyList_GET_SIZE(garbage) > 0) {
@@ -1574,6 +1575,11 @@ _PyGC_Fini(void)
Py_XDECREF(bytes);
}
}
+}
+
+void
+_PyGC_Fini(void)
+{
Py_CLEAR(callbacks);
}