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:
Armin Rigo 2006-04-12 17:06:05 +00:00
parent 314fce92dd
commit e170937af6
6 changed files with 40 additions and 5 deletions

View file

@ -578,6 +578,9 @@ environment the global variable trick is not safe.)
PyAPI_DATA(Py_ssize_t) _Py_RefTotal;
PyAPI_FUNC(void) _Py_NegativeRefcount(const char *fname,
int lineno, PyObject *op);
PyAPI_FUNC(PyObject *) _PyDict_Dummy(void);
PyAPI_FUNC(PyObject *) _PySet_Dummy(void);
PyAPI_FUNC(Py_ssize_t) _Py_GetRefTotal(void);
#define _Py_INC_REFTOTAL _Py_RefTotal++
#define _Py_DEC_REFTOTAL _Py_RefTotal--
#define _Py_REF_DEBUG_COMMA ,