From 1180b61fce77e2c06a0be764605f7fde4aad7ae3 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Mon, 14 Dec 2015 16:15:11 +0000 Subject: Add 'const' to the context lock and alloc structure pointers. This highlights the fact that we never alter the internals, and allows callers to pass in static const pointers. --- include/mupdf/fitz/context.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/mupdf/fitz/context.h b/include/mupdf/fitz/context.h index 0dce749c..32ee450d 100644 --- a/include/mupdf/fitz/context.h +++ b/include/mupdf/fitz/context.h @@ -102,8 +102,8 @@ void fz_flush_warnings(fz_context *ctx); struct fz_context_s { void *user; - fz_alloc_context *alloc; - fz_locks_context *locks; + const fz_alloc_context *alloc; + const fz_locks_context *locks; fz_id_context *id; fz_error_context *error; fz_warn_context *warn; @@ -158,7 +158,7 @@ enum { Does not throw exceptions, but may return NULL. */ -fz_context *fz_new_context_imp(fz_alloc_context *alloc, fz_locks_context *locks, unsigned int max_store, const char *version); +fz_context *fz_new_context_imp(const fz_alloc_context *alloc, const fz_locks_context *locks, unsigned int max_store, const char *version); #define fz_new_context(alloc, locks, max_store) fz_new_context_imp(alloc, locks, max_store, FZ_VERSION) -- cgit v1.2.3