diff options
author | Armin Rigo <arigo@tunes.org> | 2006-04-12 17:06:05 (GMT) |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2006-04-12 17:06:05 (GMT) |
commit | e170937af6463d92e95cea907964a23dff521f31 (patch) | |
tree | c8c4deb1ad0655eeedeef6754932db4afec7e930 /Objects/setobject.c | |
parent | 314fce92dd12a8ff82876bd18845a2249a931fae (diff) | |
download | cpython-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/setobject.c')
-rw-r--r-- | Objects/setobject.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c index edc43df..e7f6e09 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -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; \ |