summaryrefslogtreecommitdiff
path: root/src/cos_object.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2018-02-03 23:04:49 +0000
committerVincent Sanders <vince@kyllikki.org>2018-02-03 23:04:49 +0000
commiteeb93199c64db0c47dc73bb1b5a3c7d16d8172e2 (patch)
tree34aca0598b291654dd1823965cb813d927d34e11 /src/cos_object.h
parente6af9e997df381f053f3f8c85a678ad07677c791 (diff)
downloadlibnspdf-eeb93199c64db0c47dc73bb1b5a3c7d16d8172e2.tar.gz
libnspdf-eeb93199c64db0c47dc73bb1b5a3c7d16d8172e2.tar.bz2
make value extraction the same interface as getting
Diffstat (limited to 'src/cos_object.h')
-rw-r--r--src/cos_object.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cos_object.h b/src/cos_object.h
index a1a70ee..1214a65 100644
--- a/src/cos_object.h
+++ b/src/cos_object.h
@@ -149,6 +149,11 @@ nspdferror cos_free_object(struct cos_object *cos_obj);
* the entry from the dictionary. Once extracted the caller owns the returned
* object and must free it.
*
+ * Get the value for a key from a dictionary, If the dictionary is an object
+ * reference it will be dereferenced first which will parse any previously
+ * unreferenced indirect objects.
+ *
+ * \param doc The document the cos object belongs to or NULL to supress dereferencing.
* \param dict The dictionary
* \param key The key to lookup
* \param value_out The value object associated with the key
@@ -156,7 +161,7 @@ nspdferror cos_free_object(struct cos_object *cos_obj);
* NSPDFERROR_TYPE if the object passed in \p dict is not a dictionary.
* NSPDFERROR_NOTFOUND if the key is not present in the dictionary.
*/
-nspdferror cos_extract_dictionary_value(struct cos_object *dict, const char *key, struct cos_object **value_out);
+nspdferror cos_extract_dictionary_value(struct nspdf_doc *doc, struct cos_object *dict, const char *key, struct cos_object **value_out);
/**