diff Objects/setobject.c @ 37638:65ecb83ea7dd legacy-trunk

Ignore the references to the dummy objects used as deleted keys in dicts and sets when computing the total number of references.
author Armin Rigo <arigo@tunes.org>
date Wed, 12 Apr 2006 17:06:05 +0000
parents ca95ad5b0fbc
children a5902e0ec07c
line wrap: on
line diff
--- a/Objects/setobject.c	Wed Apr 12 15:28:49 2006 +0000
+++ b/Objects/setobject.c	Wed Apr 12 17:06:05 2006 +0000
@@ -16,6 +16,14 @@
 /* Object used as dummy key to fill deleted entries */
 static PyObject *dummy = NULL; /* Initialized by first call to make_new_set() */
 
+#ifdef Py_REF_DEBUG
+PyObject *
+_PySet_Dummy(void)
+{
+	return dummy;
+}
+#endif
+
 #define INIT_NONZERO_SET_SLOTS(so) do {				\
 	(so)->table = (so)->smalltable;				\
 	(so)->mask = PySet_MINSIZE - 1;				\