diff options
Diffstat (limited to 'pdf/pdf_dict.h')
-rw-r--r-- | pdf/pdf_dict.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/pdf/pdf_dict.h b/pdf/pdf_dict.h index 269f6be5..c5a8743b 100644 --- a/pdf/pdf_dict.h +++ b/pdf/pdf_dict.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 Artifex Software, Inc. +/* Copyright (C) 2018-2022 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -20,24 +20,35 @@ static inline uint64_t pdfi_dict_entries(pdf_dict *d) { return d->entries; } +int pdfi_dict_get_common(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj **o, bool cache); +static inline int pdfi_dict_get(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj **o) +{ + return pdfi_dict_get_common(ctx, d, Key, o, true); +} + +static inline int pdfi_dict_get_nocache(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj **o) +{ + return pdfi_dict_get_common(ctx, d, Key, o, true); +} + + void pdfi_free_dict(pdf_obj *o); int pdfi_dict_delete_pair(pdf_context *ctx, pdf_dict *d, pdf_name *n); int pdfi_dict_delete(pdf_context *ctx, pdf_dict *d, const char *str); int pdfi_dict_alloc(pdf_context *ctx, uint64_t size, pdf_dict **d); -int pdfi_dict_from_stack(pdf_context *ctx, uint32_t indirect_num, uint32_t indirect_gen); +int pdfi_dict_from_stack(pdf_context *ctx, uint32_t indirect_num, uint32_t indirect_gen, bool convert_string_keys); int pdfi_dict_known(pdf_context *ctx, pdf_dict *d, const char *Key, bool *known); int pdfi_dict_known_by_key(pdf_context *ctx, pdf_dict *d, pdf_name *Key, bool *known); int pdfi_dict_knownget(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj **o); int pdfi_dict_knownget_type(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj_type type, pdf_obj **o); int pdfi_dict_knownget_number(pdf_context *ctx, pdf_dict *d, const char *Key, double *f); int pdfi_merge_dicts(pdf_context *ctx, pdf_dict *target, pdf_dict *source); -int pdfi_dict_put_obj(pdf_context *ctx, pdf_dict *d, pdf_obj *Key, pdf_obj *value); +int pdfi_dict_put_obj(pdf_context *ctx, pdf_dict *d, pdf_obj *Key, pdf_obj *value, bool replace); int pdfi_dict_put(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj *value); int pdfi_dict_put_int(pdf_context *ctx, pdf_dict *d, const char *Key, int64_t value); int pdfi_dict_put_bool(pdf_context *ctx, pdf_dict *d, const char *Key, bool value); int pdfi_dict_put_name(pdf_context *ctx, pdf_dict *d, const char *Key, const char *name); int pdfi_dict_get2(pdf_context *ctx, pdf_dict *d, const char *Key1, const char *Key2, pdf_obj **o); -int pdfi_dict_get(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj **o); int pdfi_dict_get_no_deref(pdf_context *ctx, pdf_dict *d, const pdf_name *Key, pdf_obj **o); int pdfi_dict_get_by_key(pdf_context *ctx, pdf_dict *d, const pdf_name *Key, pdf_obj **o); int pdfi_dict_get_no_store_R_key(pdf_context *ctx, pdf_dict *d, const pdf_name *Key, pdf_obj **o); |