diff options
author | m-holger <m-holger@kubitscheck.org> | 2021-11-19 14:22:47 +0100 |
---|---|---|
committer | m-holger <m-holger@kubitscheck.org> | 2021-11-19 14:31:59 +0100 |
commit | 4630b8567c853e0a05d41f15b701c370f660250f (patch) | |
tree | df719e93e0f2bfd70a63d5a4d941592b973a552b /qpdf/qpdf-ctest.c | |
parent | ce7db05d22d37ec90f8a213152f3e5d7c8d08a8d (diff) | |
download | qpdf-4630b8567c853e0a05d41f15b701c370f660250f.tar.zst |
Ensure qpdf_oh handles returned by C-API functions are unique.
Return new qpdf_oh from qpdf_oh_wrap_in_array when input is already an array.
Update some doc comments in qpdf-c.h.
Diffstat (limited to 'qpdf/qpdf-ctest.c')
-rw-r--r-- | qpdf/qpdf-ctest.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qpdf/qpdf-ctest.c b/qpdf/qpdf-ctest.c index 2a051171..c954a64d 100644 --- a/qpdf/qpdf-ctest.c +++ b/qpdf/qpdf-ctest.c @@ -530,7 +530,9 @@ static void test24(char const* infile, assert(! qpdf_oh_is_scalar(qpdf, mediabox)); assert(qpdf_oh_is_array(qpdf, mediabox)); assert(qpdf_oh_get_array_n_items(qpdf, mediabox) == 4); - assert(qpdf_oh_wrap_in_array(qpdf, mediabox) == mediabox); + qpdf_oh wrapped_mediabox = qpdf_oh_wrap_in_array(qpdf, mediabox); + assert(wrapped_mediabox != mediabox); + assert(qpdf_oh_get_array_n_items(qpdf, wrapped_mediabox) == 4); for (int i = 0; i < 4; ++i) { qpdf_oh item = qpdf_oh_get_array_item(qpdf, mediabox, i); |