diff options
Diffstat (limited to 'source/fitz/hash.c')
-rw-r--r-- | source/fitz/hash.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/fitz/hash.c b/source/fitz/hash.c index 708d72f2..f80e79b3 100644 --- a/source/fitz/hash.c +++ b/source/fitz/hash.c @@ -94,7 +94,7 @@ fz_hash_get_val(fz_context *ctx, fz_hash_table *table, int idx) } void -fz_free_hash(fz_context *ctx, fz_hash_table *table) +fz_drop_hash(fz_context *ctx, fz_hash_table *table) { fz_free(ctx, table->ents); fz_free(ctx, table); @@ -159,10 +159,10 @@ fz_resize_hash(fz_context *ctx, fz_hash_table *table, int newsize) } if (table->lock == FZ_LOCK_ALLOC) - fz_unlock(ctx, FZ_LOCK_ALLOC); + fz_unlock(ctx, table->lock); newents = fz_malloc_array_no_throw(ctx, newsize, sizeof(fz_hash_entry)); if (table->lock == FZ_LOCK_ALLOC) - fz_lock(ctx, FZ_LOCK_ALLOC); + fz_lock(ctx, table->lock); if (table->lock >= 0) { if (table->size >= newsize) @@ -192,10 +192,10 @@ fz_resize_hash(fz_context *ctx, fz_hash_table *table, int newsize) } if (table->lock == FZ_LOCK_ALLOC) - fz_unlock(ctx, FZ_LOCK_ALLOC); + fz_unlock(ctx, table->lock); fz_free(ctx, oldents); if (table->lock == FZ_LOCK_ALLOC) - fz_lock(ctx, FZ_LOCK_ALLOC); + fz_lock(ctx, table->lock); } void * |