diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-03-29 22:25:09 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-04-24 16:47:43 +0200 |
commit | 51b8205a513e86c62121a927a067632c1a933839 (patch) | |
tree | c2882a6c253a715bfc2ea72854c75350f0b2024b /source/pdf/pdf-resources.c | |
parent | 67a7449fc1f186f318942b9c6b8d66d4458b7d87 (diff) | |
download | mupdf-51b8205a513e86c62121a927a067632c1a933839.tar.xz |
Remove need for namedump by using macros and preprocessor.
Add a PDF_NAME(Foo) macro that evaluates to a pdf_obj for /Foo.
Use the C preprocessor to create the enum values and string table
from one include file instead of using a separate code generator tool.
Diffstat (limited to 'source/pdf/pdf-resources.c')
-rw-r--r-- | source/pdf/pdf-resources.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/pdf/pdf-resources.c b/source/pdf/pdf-resources.c index be97a0ba..55d6603e 100644 --- a/source/pdf/pdf-resources.c +++ b/source/pdf/pdf-resources.c @@ -41,8 +41,8 @@ pdf_preload_image_resources(fz_context *ctx, pdf_document *doc) for (k = 1; k < len; k++) { obj = pdf_new_indirect(ctx, doc, k, 0); - type = pdf_dict_get(ctx, obj, PDF_NAME_Subtype); - if (pdf_name_eq(ctx, type, PDF_NAME_Image)) + type = pdf_dict_get(ctx, obj, PDF_NAME(Subtype)); + if (pdf_name_eq(ctx, type, PDF_NAME(Image))) { image = pdf_load_image(ctx, doc, obj); fz_md5_image(ctx, image, digest); |