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/fitz | |
parent | 11a544dbb2da9d5aeb608fb2e1afc97334e8dd1e (diff) | |
download | mupdf-a22a4994fd5ca4dcf20170f88a5b7fe1a5df49c4.tar.xz |
Ensure fz_store_types are all static const.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/draw-device.c | 2 | ||||
-rw-r--r-- | source/fitz/image.c | 2 | ||||
-rw-r--r-- | source/fitz/store.c | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c index 9d7a19af..857844fe 100644 --- a/source/fitz/draw-device.c +++ b/source/fitz/draw-device.c @@ -1953,7 +1953,7 @@ fz_print_tile(fz_context *ctx, fz_output *out, void *key_) fz_write_printf(ctx, out, "(tile id=%x, ctm=%g %g %g %g) ", key->id, key->ctm[0], key->ctm[1], key->ctm[2], key->ctm[3]); } -static fz_store_type fz_tile_store_type = +static const fz_store_type fz_tile_store_type = { fz_make_hash_tile_key, fz_keep_tile_key, diff --git a/source/fitz/image.c b/source/fitz/image.c index 72855395..3b0a93d6 100644 --- a/source/fitz/image.c +++ b/source/fitz/image.c @@ -96,7 +96,7 @@ fz_needs_reap_image_key(fz_context *ctx, void *key_) return (key->image->key_storable.needs_reaping); } -static fz_store_type fz_image_store_type = +static const fz_store_type fz_image_store_type = { fz_make_hash_image_key, fz_keep_image_key, diff --git a/source/fitz/store.c b/source/fitz/store.c index 70f25029..f7cda31a 100644 --- a/source/fitz/store.c +++ b/source/fitz/store.c @@ -10,7 +10,7 @@ struct fz_item_s fz_item *next; fz_item *prev; fz_store *store; - fz_store_type *type; + const fz_store_type *type; }; struct fz_store_s @@ -389,7 +389,7 @@ touch(fz_store *store, fz_item *item) } void * -fz_store_item(fz_context *ctx, void *key, void *val_, size_t itemsize, fz_store_type *type) +fz_store_item(fz_context *ctx, void *key, void *val_, size_t itemsize, const fz_store_type *type) { fz_item *item = NULL; size_t size; @@ -525,7 +525,7 @@ fz_store_item(fz_context *ctx, void *key, void *val_, size_t itemsize, fz_store_ } void * -fz_find_item(fz_context *ctx, fz_store_drop_fn *drop, void *key, fz_store_type *type) +fz_find_item(fz_context *ctx, fz_store_drop_fn *drop, void *key, const fz_store_type *type) { fz_item *item; fz_store *store = ctx->store; @@ -578,7 +578,7 @@ fz_find_item(fz_context *ctx, fz_store_drop_fn *drop, void *key, fz_store_type * } void -fz_remove_item(fz_context *ctx, fz_store_drop_fn *drop, void *key, fz_store_type *type) +fz_remove_item(fz_context *ctx, fz_store_drop_fn *drop, void *key, const fz_store_type *type) { fz_item *item; fz_store *store = ctx->store; @@ -832,7 +832,7 @@ fz_shrink_store(fz_context *ctx, unsigned int percent) return success; } -void fz_filter_store(fz_context *ctx, fz_store_filter_fn *fn, void *arg, fz_store_type *type) +void fz_filter_store(fz_context *ctx, fz_store_filter_fn *fn, void *arg, const fz_store_type *type) { fz_store *store; fz_item *item, *prev, *remove; |