diff Objects/stringobject.c @ 16751:ca1be7d00413 legacy-trunk

_Py_ReleaseInternedStrings(): Private API function to decref and release the interned string dictionary. This is useful for memory use debugging because it eliminates a huge source of noise from the reports. Only defined when INTERN_STRINGS is defined.
author Barry Warsaw <barry@python.org>
date Fri, 23 Feb 2001 16:40:48 +0000
parents c7c404b35f33
children 8ec7f656f808
line wrap: on
line diff
--- a/Objects/stringobject.c	Fri Feb 23 16:32:32 2001 +0000
+++ b/Objects/stringobject.c	Fri Feb 23 16:40:48 2001 +0000
@@ -3217,3 +3217,13 @@
 	}
 #endif
 }
+
+#ifdef INTERN_STRINGS
+void _Py_ReleaseInternedStrings(void)
+{
+	if (interned) {
+		Py_DECREF(interned);
+		interned = NULL;
+	}
+}
+#endif /* INTERN_STRINGS */