diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2016-09-28 20:02:41 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-10-05 19:37:13 +0100 |
commit | 9be02aade41637fc530774cf2f598a8f69f53bd0 (patch) | |
tree | 77aaedfcdf5f2f8e43432578cc8c91860d872590 | |
parent | da940e1c59d5305af22726cfe13fc96ec23147a1 (diff) | |
download | mupdf-9be02aade41637fc530774cf2f598a8f69f53bd0.tar.xz |
Add a const to a lookup function.
-rw-r--r-- | include/mupdf/fitz/font.h | 2 | ||||
-rw-r--r-- | source/fitz/font.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/mupdf/fitz/font.h b/include/mupdf/fitz/font.h index 0c31dbff..3d7ac57a 100644 --- a/include/mupdf/fitz/font.h +++ b/include/mupdf/fitz/font.h @@ -21,7 +21,7 @@ typedef struct fz_font_s fz_font; * Type 3 fonts have callbacks to the interpreter. */ -char *ft_error_string(int err); +const char *ft_error_string(int err); /* common CJK font collections */ enum { FZ_ADOBE_CNS_1, FZ_ADOBE_GB_1, FZ_ADOBE_JAPAN_1, FZ_ADOBE_KOREA_1 }; diff --git a/source/fitz/font.c b/source/fitz/font.c index 3fde0aec..b22781e4 100644 --- a/source/fitz/font.c +++ b/source/fitz/font.c @@ -379,7 +379,7 @@ static const struct ft_error ft_errors[] = #include FT_ERRORS_H }; -char *ft_error_string(int err) +const char *ft_error_string(int err) { const struct ft_error *e; @@ -408,7 +408,7 @@ fz_keep_freetype(fz_context *ctx) fterr = FT_Init_FreeType(&fct->ftlib); if (fterr) { - char *mess = ft_error_string(fterr); + const char *mess = ft_error_string(fterr); fz_unlock(ctx, FZ_LOCK_FREETYPE); fz_throw(ctx, FZ_ERROR_GENERIC, "cannot init freetype: %s", mess); } |