Mercurial > cpython-lru_cache-weakref
comparison Python/sysmodule.c @ 37639:bc4fbbb2db30 2.4
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:58 +0000 |
| parents | e1df48f2847a |
| children | 11f66731554d |
comparison
equal
deleted
inserted
replaced
| 37637:9a6a0375ef22 | 37639:bc4fbbb2db30 |
|---|---|
| 602 | 602 |
| 603 #ifdef Py_REF_DEBUG | 603 #ifdef Py_REF_DEBUG |
| 604 static PyObject * | 604 static PyObject * |
| 605 sys_gettotalrefcount(PyObject *self) | 605 sys_gettotalrefcount(PyObject *self) |
| 606 { | 606 { |
| 607 return PyInt_FromLong(_Py_RefTotal); | 607 return PyInt_FromLong(_Py_GetRefTotal()); |
| 608 } | 608 } |
| 609 | 609 #endif /* Py_REF_DEBUG */ |
| 610 #endif /* Py_TRACE_REFS */ | |
| 611 | 610 |
| 612 PyDoc_STRVAR(getrefcount_doc, | 611 PyDoc_STRVAR(getrefcount_doc, |
| 613 "getrefcount(object) -> integer\n\ | 612 "getrefcount(object) -> integer\n\ |
| 614 \n\ | 613 \n\ |
| 615 Return the reference count of object. The count returned is generally\n\ | 614 Return the reference count of object. The count returned is generally\n\ |
