From bf08301ded2f44e33bebf5572587a9c7102dcc98 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 22 Mar 2013 00:58:00 +0000 Subject: Fix store debugging fns so that all output goes to the same file. --- fitz/fitz-internal.h | 2 +- fitz/res_store.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'fitz') diff --git a/fitz/fitz-internal.h b/fitz/fitz-internal.h index b76510cf..0436bfcd 100644 --- a/fitz/fitz-internal.h +++ b/fitz/fitz-internal.h @@ -490,7 +490,7 @@ struct fz_store_type_s void (*drop_key)(fz_context *,void *); int (*cmp_key)(void *, void *); #ifndef NDEBUG - void (*debug)(void *); + void (*debug)(FILE *, void *); #endif }; diff --git a/fitz/res_store.c b/fitz/res_store.c index a7d780b2..f9f305d9 100644 --- a/fitz/res_store.c +++ b/fitz/res_store.c @@ -363,7 +363,7 @@ fz_remove_item(fz_context *ctx, fz_store_free_fn *free, void *key, fz_store_type fz_item *item; fz_store *store = ctx->store; int drop; - fz_store_hash hash; + fz_store_hash hash = { NULL }; int use_hash = 0; if (type->make_hash_key) @@ -471,7 +471,7 @@ fz_print_store(fz_context *ctx, FILE *out) next->val->refs++; fprintf(out, "store[*][refs=%d][size=%d] ", item->val->refs, item->size); fz_unlock(ctx, FZ_LOCK_ALLOC); - item->type->debug(item->key); + item->type->debug(out, item->key); fprintf(out, " = %p\n", item->val); fz_lock(ctx, FZ_LOCK_ALLOC); if (next) -- cgit v1.2.3