diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2017-03-24 16:34:48 -0400 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2017-03-24 17:26:25 -0400 |
commit | a22a4994fd5ca4dcf20170f88a5b7fe1a5df49c4 (patch) | |
tree | 5e2e8a963c815554f7eb380374aad245ce5f2818 /source/pdf | |
parent | 11a544dbb2da9d5aeb608fb2e1afc97334e8dd1e (diff) | |
download | mupdf-a22a4994fd5ca4dcf20170f88a5b7fe1a5df49c4.tar.xz |
Ensure fz_store_types are all static const.
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-font.c | 8 | ||||
-rw-r--r-- | source/pdf/pdf-store.c | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source/pdf/pdf-font.c b/source/pdf/pdf-font.c index 3cced0d8..d993188c 100644 --- a/source/pdf/pdf-font.c +++ b/source/pdf/pdf-font.c @@ -963,7 +963,9 @@ hail_mary_print_key(fz_context *ctx, fz_output *out, void *key_) fz_write_printf(ctx, out, "hail mary "); } -static fz_store_type hail_mary_store_type = +static int hail_mary_store_key; /* Dummy */ + +static const fz_store_type hail_mary_store_type = { hail_mary_make_hash_key, hail_mary_keep_key, @@ -978,7 +980,7 @@ pdf_load_hail_mary_font(fz_context *ctx, pdf_document *doc) pdf_font_desc *fontdesc; pdf_font_desc *existing; - if ((fontdesc = fz_find_item(ctx, pdf_drop_font_imp, &hail_mary_store_type, &hail_mary_store_type)) != NULL) + if ((fontdesc = fz_find_item(ctx, pdf_drop_font_imp, &hail_mary_store_key, &hail_mary_store_type)) != NULL) { return fontdesc; } @@ -986,7 +988,7 @@ pdf_load_hail_mary_font(fz_context *ctx, pdf_document *doc) /* FIXME: Get someone with a clue about fonts to fix this */ fontdesc = pdf_load_simple_font_by_name(ctx, doc, NULL, "Helvetica"); - existing = fz_store_item(ctx, &hail_mary_store_type, fontdesc, fontdesc->size, &hail_mary_store_type); + existing = fz_store_item(ctx, &hail_mary_store_key, fontdesc, fontdesc->size, &hail_mary_store_type); assert(existing == NULL); (void)existing; /* Silence warning in release builds */ diff --git a/source/pdf/pdf-store.c b/source/pdf/pdf-store.c index e29e7ccb..c2d0669e 100644 --- a/source/pdf/pdf-store.c +++ b/source/pdf/pdf-store.c @@ -41,7 +41,7 @@ pdf_print_key(fz_context *ctx, fz_output *out, void *key_) pdf_print_obj(ctx, out, key, 0); } -static fz_store_type pdf_obj_store_type = +static const fz_store_type pdf_obj_store_type = { pdf_make_hash_key, pdf_keep_key, |