diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-11-12 13:29:37 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-11-12 17:30:04 +0100 |
commit | 8a8114cc9c3ae2f9bc866e15ea9f69778c63c3a3 (patch) | |
tree | 7f031c287ae0b628c913bbac3ba0dfbeec6ce573 /source/pdf | |
parent | 643ff675ff47b5d3d21ebf6a30ffa844fe582f2e (diff) | |
download | mupdf-8a8114cc9c3ae2f9bc866e15ea9f69778c63c3a3.tar.xz |
Remove confusing flag define.
What's the difference between PDF_OBJ_FLAG_MARK and PDF_FLAGS_MARKED?
PDF_OBJ_FLAG_MARK is used to flag an xref entry as one that we want
to keep cached with the pdf_mark_xref/pdf_clear_xref_to_mark functions.
PDF_FLAGS_MARKED is used to detect unwanted recursion in PDF structures.
Renaming the xref_entry.flags field to xref_entry.marked should remove this
source of potential confusion.
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-xref.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c index 71b74b65..4409681e 100644 --- a/source/pdf/pdf-xref.c +++ b/source/pdf/pdf-xref.c @@ -2814,7 +2814,7 @@ void pdf_mark_xref(fz_context *ctx, pdf_document *doc) pdf_xref_entry *entry = &sub->table[e]; if (entry->obj) { - entry->flags |= PDF_OBJ_FLAG_MARK; + entry->marked = 1; } } } @@ -2869,7 +2869,7 @@ void pdf_clear_xref_to_mark(fz_context *ctx, pdf_document *doc) * been updated */ if (entry->obj != NULL && entry->stm_buf == NULL) { - if ((entry->flags & PDF_OBJ_FLAG_MARK) == 0 && pdf_obj_refs(ctx, entry->obj) == 1) + if (!entry->marked && pdf_obj_refs(ctx, entry->obj) == 1) { pdf_drop_obj(ctx, entry->obj); entry->obj = NULL; |