mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Ignore the references to the dummy objects used as deleted keys
in dicts and sets when computing the total number of references.
This commit is contained in:
parent
314fce92dd
commit
e170937af6
6 changed files with 40 additions and 5 deletions
|
|
@ -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; \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue