diff options
Diffstat (limited to 'pdf/pdf_object.c')
-rw-r--r-- | pdf/pdf_object.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pdf/pdf_object.c b/pdf/pdf_object.c index 9ebb4aec..8a2d71fc 100644 --- a/pdf/pdf_object.c +++ b/pdf/pdf_object.c @@ -1056,6 +1056,25 @@ pdf_dict_putp(pdf_obj *obj, const char *keys, pdf_obj *val) } void +pdf_dict_putp_drop(pdf_obj *obj, const char *keys, pdf_obj *val) +{ + fz_context *ctx = obj->ctx; + + fz_try(ctx) + { + pdf_dict_putp(obj, keys, val); + } + fz_always(ctx) + { + pdf_drop_obj(val); + } + fz_catch(ctx) + { + fz_rethrow(ctx); + } +} + +void pdf_dict_dels(pdf_obj *obj, const char *key) { RESOLVE(obj); |