summaryrefslogtreecommitdiff
path: root/xps/xps_zip.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-04-03 15:26:44 +0200
committerTor Andersson <tor.andersson@artifex.com>2011-04-03 16:01:34 +0200
commit6af0abc477539365a19a4797babfd567da4d375f (patch)
tree6a5edad9154113dacb98cf966532eb507f6bcc29 /xps/xps_zip.c
parent8e0110dcba95b991fc397a8c1b70c97953b1b8d5 (diff)
downloadmupdf-6af0abc477539365a19a4797babfd567da4d375f.tar.xz
xps: Remove xps_context from hash table implementation.
Diffstat (limited to 'xps/xps_zip.c')
-rw-r--r--xps/xps_zip.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/xps/xps_zip.c b/xps/xps_zip.c
index 89509cb3..d353ec11 100644
--- a/xps/xps_zip.c
+++ b/xps/xps_zip.c
@@ -433,20 +433,20 @@ xps_new_context(void)
memset(ctx, 0, sizeof(xps_context));
- ctx->font_table = xps_hash_new(ctx);
- ctx->colorspace_table = xps_hash_new(ctx);
+ ctx->font_table = xps_hash_new();
+ ctx->colorspace_table = xps_hash_new();
ctx->start_part = NULL;
return ctx;
}
-static void xps_free_key_func(xps_context *ctx, void *ptr)
+static void xps_free_key_func(void *ptr)
{
fz_free(ptr);
}
-static void xps_free_font_func(xps_context *ctx, void *ptr)
+static void xps_free_font_func(void *ptr)
{
fz_dropfont(ptr);
}
@@ -463,9 +463,8 @@ xps_free_context(xps_context *ctx)
fz_free(ctx->zip_table[i].name);
fz_free(ctx->zip_table);
- /* TODO: free resources too */
- xps_hash_free(ctx, ctx->font_table, xps_free_key_func, xps_free_font_func);
- xps_hash_free(ctx, ctx->colorspace_table, xps_free_key_func, NULL);
+ xps_hash_free(ctx->font_table, xps_free_key_func, xps_free_font_func);
+ xps_hash_free(ctx->colorspace_table, xps_free_key_func, NULL);
xps_free_page_list(ctx);