diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2022-02-16 16:24:49 +0000 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2022-02-16 17:02:45 +0000 |
commit | 36a8420ecaf3acff28658e6826401d81fa4f36fd (patch) | |
tree | 24be8c7e401cbdc043ef38f215c8b197596cae26 /pdf/pdf_deref.c | |
parent | ae1061d948d88667bdf51d47d918c4684d0f67df (diff) | |
download | ghostpdl-36a8420ecaf3acff28658e6826401d81fa4f36fd.tar.gz |
pdfi: add option to not replace existing entries in dictionaries
In certain cases, we want to ignore duplicate keys being written to a
dictionary, so add a parameter to pdfi_dict_put_obj() telling it to behave
thus.
It saves the expense of doing a pdfi_dict_known_by_key() first.
And take advantage of it in the Type 1 font code.
Diffstat (limited to 'pdf/pdf_deref.c')
-rw-r--r-- | pdf/pdf_deref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pdf/pdf_deref.c b/pdf/pdf_deref.c index 95a59ac53..be48e4f20 100644 --- a/pdf/pdf_deref.c +++ b/pdf/pdf_deref.c @@ -1091,7 +1091,7 @@ static int pdfi_resolve_indirect_dict(pdf_context *ctx, pdf_obj *obj, bool recur if (code < 0) goto exit; /* don't store the object if it's a stream (leave as a ref) */ if (Value->type != PDF_STREAM) - pdfi_dict_put_obj(ctx, dict, (pdf_obj *)Key, Value); + pdfi_dict_put_obj(ctx, dict, (pdf_obj *)Key, Value, true); if (recurse) code = pdfi_resolve_indirect_loop_detect(ctx, NULL, Value, recurse); } |