Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.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 | 6c3d0a0c1956 |
| children | 54d177ede883 |
comparison
equal
deleted
inserted
replaced
| 37637:9a6a0375ef22 | 37639:bc4fbbb2db30 |
|---|---|
| 377 #ifdef COUNT_ALLOCS | 377 #ifdef COUNT_ALLOCS |
| 378 dump_counts(); | 378 dump_counts(); |
| 379 #endif | 379 #endif |
| 380 | 380 |
| 381 #ifdef Py_REF_DEBUG | 381 #ifdef Py_REF_DEBUG |
| 382 fprintf(stderr, "[%ld refs]\n", _Py_RefTotal); | 382 fprintf(stderr, "[%ld refs]\n", _Py_GetRefTotal()); |
| 383 #endif | 383 #endif |
| 384 | 384 |
| 385 #ifdef Py_TRACE_REFS | 385 #ifdef Py_TRACE_REFS |
| 386 /* Display all objects still alive -- this can invoke arbitrary | 386 /* Display all objects still alive -- this can invoke arbitrary |
| 387 * __repr__ overrides, so requires a mostly-intact interpreter. | 387 * __repr__ overrides, so requires a mostly-intact interpreter. |
| 692 Py_XDECREF(v); | 692 Py_XDECREF(v); |
| 693 } | 693 } |
| 694 for (;;) { | 694 for (;;) { |
| 695 ret = PyRun_InteractiveOneFlags(fp, filename, flags); | 695 ret = PyRun_InteractiveOneFlags(fp, filename, flags); |
| 696 #ifdef Py_REF_DEBUG | 696 #ifdef Py_REF_DEBUG |
| 697 fprintf(stderr, "[%ld refs]\n", _Py_RefTotal); | 697 fprintf(stderr, "[%ld refs]\n", _Py_GetRefTotal()); |
| 698 #endif | 698 #endif |
| 699 if (ret == E_EOF) | 699 if (ret == E_EOF) |
| 700 return 0; | 700 return 0; |
| 701 /* | 701 /* |
| 702 if (ret == E_NOMEM) | 702 if (ret == E_NOMEM) |
