[Python-checkins] CVS: python/dist/src/Modules gcmodule.c,2.3,2.4
Fred L. Drake
python-dev@python.org
Tue, 11 Jul 2000 07:37:44 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv26316
Modified Files:
gcmodule.c
Log Message:
Neil Schemenauer <nascheme@enme.ucalgary.ca>:
Change a cast, intialize a local, and make some sprintf() format strings
type-appropriate (add the "l" to "%d").
Closes SourceForge patch #100737.
Index: gcmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v
retrieving revision 2.3
retrieving revision 2.4
diff -C2 -r2.3 -r2.4
*** gcmodule.c 2000/07/10 17:10:26 2.3
--- gcmodule.c 2000/07/11 14:37:41 2.4
***************
*** 290,297 ****
} else if (debug & DEBUG_OBJECTS) {
char buf[200];
! sprintf(buf, "gc: %s<%s 0x%x>\n",
msg,
op->ob_type->tp_name,
! (long)op);
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);
}
***************
*** 369,373 ****
sprintf(buf, "gc: collecting generation %d...\n", generation);
PyFile_WriteString(buf,output);
! sprintf(buf, "gc: objects in each generation: %d %d %d\n",
gc_list_size(&generation0),
gc_list_size(&generation1),
--- 369,373 ----
sprintf(buf, "gc: collecting generation %d...\n", generation);
PyFile_WriteString(buf,output);
! sprintf(buf, "gc: objects in each generation: %ld %ld %ld\n",
gc_list_size(&generation0),
gc_list_size(&generation1),
***************
*** 435,439 ****
char buf[200];
sprintf(buf,
! "gc: done, %d unreachable, %d uncollectable.\n",
n+m, n);
PyFile_WriteString(buf, output);
--- 435,439 ----
char buf[200];
sprintf(buf,
! "gc: done, %ld unreachable, %ld uncollectable.\n",
n+m, n);
PyFile_WriteString(buf, output);