[Python-checkins] CVS: python/dist/src/Objects object.c,2.146,2.147
Guido van Rossum
gvanrossum@users.sourceforge.net
Fri, 14 Sep 2001 08:50:10 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv3089
Modified Files:
object.c
Log Message:
_PyObject_Dump(): print the type of the object. This is by far the
most frequently interesting information IMO. Also tidy up the output.
Index: object.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v
retrieving revision 2.146
retrieving revision 2.147
diff -C2 -d -r2.146 -r2.147
*** object.c 2001/09/11 01:41:59 2.146
--- object.c 2001/09/14 15:50:08 2.147
***************
*** 195,201 ****
fprintf(stderr, "NULL\n");
else {
(void)PyObject_Print(op, stderr, 0);
! fprintf(stderr, "\nrefcounts: %d\n", op->ob_refcnt);
! fprintf(stderr, "address : %p\n", op);
}
}
--- 195,207 ----
fprintf(stderr, "NULL\n");
else {
+ fprintf(stderr, "object : ");
(void)PyObject_Print(op, stderr, 0);
! fprintf(stderr, "\n"
! "type : %s\n"
! "refcount: %d\n"
! "address : %p\n",
! op->ob_type==NULL ? "NULL" : op->ob_type->tp_name,
! op->ob_refcnt,
! op);
}
}