[Python-checkins] CVS: python/dist/src/Modules gcmodule.c,2.5,2.6
Barry Warsaw
python-dev@python.org
Tue, 11 Jul 2000 22:18:38 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv1612
Modified Files:
gcmodule.c
Log Message:
debug_instance(): Use the same %p format directive as with
debug_cycle(), and don't cast the pointer to a long. Neither needs
the literal `0x' prefix as %p automatically inserts this (on Linux at
least).
Index: gcmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v
retrieving revision 2.5
retrieving revision 2.6
diff -C2 -r2.5 -r2.6
*** gcmodule.c 2000/07/12 04:42:23 2.5
--- gcmodule.c 2000/07/12 05:18:36 2.6
***************
*** 278,283 ****
else
cname = "?";
! sprintf(buf, "gc: %s<%.100s instance at %lx>\n",
! msg, cname, (long)inst);
PyFile_WriteString(buf, output);
}
--- 278,282 ----
else
cname = "?";
! sprintf(buf, "gc: %s<%.100s instance at %p>\n", msg, cname, inst);
PyFile_WriteString(buf, output);
}
***************
*** 290,297 ****
} else if (debug & DEBUG_OBJECTS) {
char buf[200];
! sprintf(buf, "gc: %s<%.100s 0x%p>\n",
! msg,
! op->ob_type->tp_name,
! op);
PyFile_WriteString(buf, output);
}
--- 289,294 ----
} else if (debug & DEBUG_OBJECTS) {
char buf[200];
! sprintf(buf, "gc: %s<%.100s %p>\n", msg,
! op->ob_type->tp_name, op);
PyFile_WriteString(buf, output);
}