Use PY_FORMAT_SIZE_T instead of z for string formatting. Thanks Neal.

This commit is contained in:
Christian Heimes 2008-02-24 12:26:16 +00:00
parent 114dd944de
commit 09bde04154
2 changed files with 8 additions and 4 deletions

View File

@ -171,8 +171,10 @@ static size_t count_reuse = 0;
static void static void
show_alloc(void) show_alloc(void)
{ {
fprintf(stderr, "Dict allocations: %zd\n", count_alloc); fprintf(stderr, "Dict allocations: %" PY_FORMAT_SIZE_T "d\n",
fprintf(stderr, "Dict reuse through freelist: %zd\n", count_reuse); count_alloc);
fprintf(stderr, "Dict reuse through freelist: %" PY_FORMAT_SIZE_T
"d\n", count_reuse);
fprintf(stderr, "%.2f%% reuse rate\n\n", fprintf(stderr, "%.2f%% reuse rate\n\n",
(100.0*count_reuse/(count_alloc+count_reuse))); (100.0*count_reuse/(count_alloc+count_reuse)));
} }

View File

@ -72,8 +72,10 @@ static size_t count_reuse = 0;
static void static void
show_alloc(void) show_alloc(void)
{ {
fprintf(stderr, "List allocations: %zd\n", count_alloc); fprintf(stderr, "List allocations: %" PY_FORMAT_SIZE_T "d\n",
fprintf(stderr, "List reuse through freelist: %zd\n", count_reuse); count_alloc);
fprintf(stderr, "List reuse through freelist: %" PY_FORMAT_SIZE_T
"d\n", count_reuse);
fprintf(stderr, "%.2f%% reuse rate\n\n", fprintf(stderr, "%.2f%% reuse rate\n\n",
(100.0*count_reuse/(count_alloc+count_reuse))); (100.0*count_reuse/(count_alloc+count_reuse)));
} }