summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-font.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2017-03-24 16:34:48 -0400
committerRobin Watts <Robin.Watts@artifex.com>2017-03-24 17:26:25 -0400
commita22a4994fd5ca4dcf20170f88a5b7fe1a5df49c4 (patch)
tree5e2e8a963c815554f7eb380374aad245ce5f2818 /source/pdf/pdf-font.c
parent11a544dbb2da9d5aeb608fb2e1afc97334e8dd1e (diff)
downloadmupdf-a22a4994fd5ca4dcf20170f88a5b7fe1a5df49c4.tar.xz
Ensure fz_store_types are all static const.
Diffstat (limited to 'source/pdf/pdf-font.c')
-rw-r--r--source/pdf/pdf-font.c8
1 files changed, 5 insertions, 3 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 */