summaryrefslogtreecommitdiffstats
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2006-04-12 17:06:05 (GMT)
committerArmin Rigo <arigo@tunes.org>2006-04-12 17:06:05 (GMT)
commite170937af6463d92e95cea907964a23dff521f31 (patch)
treec8c4deb1ad0655eeedeef6754932db4afec7e930 /Objects/dictobject.c
parent314fce92dd12a8ff82876bd18845a2249a931fae (diff)
downloadcpython-e170937af6463d92e95cea907964a23dff521f31.zip
cpython-e170937af6463d92e95cea907964a23dff521f31.tar.gz
cpython-e170937af6463d92e95cea907964a23dff521f31.tar.bz2
Ignore the references to the dummy objects used as deleted keys
in dicts and sets when computing the total number of references.
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index f6fa1eb..31ef958e 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -115,6 +115,14 @@ equally good collision statistics, needed less code & used less memory.
/* Object used as dummy key to fill deleted entries */
static PyObject *dummy = NULL; /* Initialized by first call to newdictobject() */
+#ifdef Py_REF_DEBUG
+PyObject *
+_PyDict_Dummy(void)
+{
+ return dummy;
+}
+#endif
+
/* forward declarations */
static dictentry *
lookdict_string(dictobject *mp, PyObject *key, long hash);