[Python-checkins] python/dist/src/Objects object.c,2.182,2.183
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Sun, 07 Jul 2002 12:59:52 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv7577/python/Objects
Modified Files:
object.c
Log Message:
Rearranged and added comments to object.h, to clarify many things
that have taken me "too long" to reverse-engineer over the years.
Vastly reduced the nesting level and redundancy of #ifdef-ery.
Took a light stab at repairing comments that are no longer true.
sys_gettotalrefcount(): Changed to enable under Py_REF_DEBUG.
It was enabled under Py_TRACE_REFS, which was much heavier than
necessary. sys.gettotalrefcount() is now available in a
Py_REF_DEBUG-only build.
Index: object.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v
retrieving revision 2.182
retrieving revision 2.183
diff -C2 -d -r2.182 -r2.183
*** object.c 7 Jul 2002 16:52:50 -0000 2.182
--- object.c 7 Jul 2002 19:59:50 -0000 2.183
***************
*** 1859,1865 ****
refchain._ob_next->_ob_prev = op;
refchain._ob_next = op;
! #ifdef COUNT_ALLOCS
! inc_count(op->ob_type);
! #endif
}
--- 1859,1863 ----
refchain._ob_next->_ob_prev = op;
refchain._ob_next = op;
! _PyMAYBE_BUMP_COUNT(op);
}
***************
*** 1886,1892 ****
op->_ob_prev->_ob_next = op->_ob_next;
op->_ob_next = op->_ob_prev = NULL;
! #ifdef COUNT_ALLOCS
! op->ob_type->tp_frees++;
! #endif
}
--- 1884,1888 ----
op->_ob_prev->_ob_next = op->_ob_next;
op->_ob_next = op->_ob_prev = NULL;
! _PyMAYBE_BUMP_FREECOUNT(op);
}