[Python-checkins] CVS: python/dist/src/Objects classobject.c,2.127.2.4,2.127.2.5 object.c,2.124.4.13,2.124.4.14
Guido van Rossum
gvanrossum@users.sourceforge.net
Sat, 16 Jun 2001 06:59:50 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv30033/Objects
Modified Files:
Tag: descr-branch
classobject.c object.c
Log Message:
Rename the *other* tp_alloc to tp_allocs.
Index: classobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v
retrieving revision 2.127.2.4
retrieving revision 2.127.2.5
diff -C2 -r2.127.2.4 -r2.127.2.5
*** classobject.c 2001/06/05 12:45:46 2.127.2.4
--- classobject.c 2001/06/16 13:59:48 2.127.2.5
***************
*** 560,564 ****
* _Py_RefTotal was also boosted; we'll knock that down later.
*/
! inst->ob_type->tp_alloc--;
#endif
#else /* !Py_TRACE_REFS */
--- 560,564 ----
* _Py_RefTotal was also boosted; we'll knock that down later.
*/
! inst->ob_type->tp_allocs--;
#endif
#else /* !Py_TRACE_REFS */
Index: object.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v
retrieving revision 2.124.4.13
retrieving revision 2.124.4.14
diff -C2 -r2.124.4.13 -r2.124.4.14
*** object.c 2001/06/07 18:31:55 2.124.4.13
--- object.c 2001/06/16 13:59:48 2.124.4.14
***************
*** 33,37 ****
for (tp = type_list; tp; tp = tp->tp_next)
fprintf(stderr, "%s alloc'd: %d, freed: %d, max in use: %d\n",
! tp->tp_name, tp->tp_alloc, tp->tp_free,
tp->tp_maxalloc);
fprintf(stderr, "fast tuple allocs: %d, empty: %d\n",
--- 33,37 ----
for (tp = type_list; tp; tp = tp->tp_next)
fprintf(stderr, "%s alloc'd: %d, freed: %d, max in use: %d\n",
! tp->tp_name, tp->tp_allocs, tp->tp_free,
tp->tp_maxalloc);
fprintf(stderr, "fast tuple allocs: %d, empty: %d\n",
***************
*** 54,58 ****
return NULL;
for (tp = type_list; tp; tp = tp->tp_next) {
! v = Py_BuildValue("(siii)", tp->tp_name, tp->tp_alloc,
tp->tp_free, tp->tp_maxalloc);
if (v == NULL) {
--- 54,58 ----
return NULL;
for (tp = type_list; tp; tp = tp->tp_next) {
! v = Py_BuildValue("(siii)", tp->tp_name, tp->tp_allocs,
tp->tp_free, tp->tp_maxalloc);
if (v == NULL) {
***************
*** 73,77 ****
inc_count(PyTypeObject *tp)
{
! if (tp->tp_alloc == 0) {
/* first time; insert in linked list */
if (tp->tp_next != NULL) /* sanity check */
--- 73,77 ----
inc_count(PyTypeObject *tp)
{
! if (tp->tp_allocs == 0) {
/* first time; insert in linked list */
if (tp->tp_next != NULL) /* sanity check */
***************
*** 80,86 ****
type_list = tp;
}
! tp->tp_alloc++;
! if (tp->tp_alloc - tp->tp_free > tp->tp_maxalloc)
! tp->tp_maxalloc = tp->tp_alloc - tp->tp_free;
}
#endif
--- 80,86 ----
type_list = tp;
}
! tp->tp_allocs++;
! if (tp->tp_allocs - tp->tp_free > tp->tp_maxalloc)
! tp->tp_maxalloc = tp->tp_allocs - tp->tp_free;
}
#endif