diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-09-08 14:03:57 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-09-08 16:36:39 +0200 |
commit | dba61da1bfb7e4d74c723f369d1c017df9707a14 (patch) | |
tree | 04c51f86dc066c710c23423fe178e051b20b49d9 /include/qpdf/QPDFObjectHandle.hh | |
parent | 264e25f391f83bcbeb60590f18ff96719b086454 (diff) | |
download | qpdf-dba61da1bfb7e4d74c723f369d1c017df9707a14.tar.zst |
Create a special "destroyed" type rather than using null
When a QPDF is destroyed, changing indirect objects to direct nulls
makes them effectively disappear silently when they sneak into other
places. Instead, we should treat this as an error. Adding a destroyed
object type makes this possible.
Diffstat (limited to 'include/qpdf/QPDFObjectHandle.hh')
-rw-r--r-- | include/qpdf/QPDFObjectHandle.hh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 76e36eae..a4768f97 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -391,6 +391,11 @@ class QPDFObjectHandle QPDF_DLL inline bool isIndirect() const; + // This returns true for indirect objects from a QPDF that has + // been destroyed. + QPDF_DLL + bool isDestroyed(); + // True for everything except array, dictionary, stream, word, and // inline image. QPDF_DLL |