diff options
author | Guido van Rossum <guido@python.org> | 1995-04-06 14:46:26 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-04-06 14:46:26 (GMT) |
commit | d8953cb8d93e8e2f52521a91fa1b090fb52c4e5c (patch) | |
tree | 3bf5ba92f87bd3b682de74c2c6170df7500e9695 /Objects | |
parent | 91e7a0bd2a02e885fd145bf6e19c1f8ed97a99a6 (diff) | |
download | cpython-d8953cb8d93e8e2f52521a91fa1b090fb52c4e5c.zip cpython-d8953cb8d93e8e2f52521a91fa1b090fb52c4e5c.tar.gz cpython-d8953cb8d93e8e2f52521a91fa1b090fb52c4e5c.tar.bz2 |
change in counting freed objects
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/object.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/object.c b/Objects/object.c index fc8d525..d7110ae 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -61,7 +61,7 @@ inc_count(tp) typeobject *tp; { if (tp->tp_alloc == 0) { - /* first time; hang in linked list */ + /* first time; insert in linked list */ if (tp->tp_next != NULL) /* sanity check */ fatal("XXX inc_count sanity check"); tp->tp_next = type_list; @@ -490,6 +490,9 @@ UNREF(op) op->_ob_next->_ob_prev = op->_ob_prev; op->_ob_prev->_ob_next = op->_ob_next; op->_ob_next = op->_ob_prev = NULL; +#ifdef COUNT_ALLOCS + op->ob_type->tp_free++; +#endif } DELREF(op) @@ -497,9 +500,6 @@ DELREF(op) { destructor dealloc = op->ob_type->tp_dealloc; UNREF(op); -#ifdef COUNT_ALLOCS - op->ob_type->tp_free++; -#endif op->ob_type = NULL; (*dealloc)(op); } |