aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-09-05 15:26:49 +0200
committerJay Berkenbilt <ejb@ql.org>2022-09-06 00:52:59 +0200
commit55cc2ab68094984f4550f75feb0124726146d27e (patch)
tree845e538f36ff565743d85a608b736df649d23a3b /qpdf
parent6c61be00e8366d467e7e4c82a6d91a4d074a1181 (diff)
downloadqpdf-55cc2ab68094984f4550f75feb0124726146d27e.tar.zst
Re-introduce QPDFObject.hh as deprecated
* Just removing a header file would cause build errors with no hint as to what happened. This way, people get a warning rather than error for the life of qpdf 11, and the warning tells them what to do. * This avoids build surprises resulting from having two versions of QPDF headers installed at once. If you were building code out of a checkout of qpdf but had an older version installed on your system, if your code included <qpdf/QPDFObject.hh>, everything would work, but then your code would break without QPDFObject.hh later.
Diffstat (limited to 'qpdf')
-rw-r--r--qpdf/test_driver.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/qpdf/test_driver.cc b/qpdf/test_driver.cc
index ea4ac73a..16b65d8d 100644
--- a/qpdf/test_driver.cc
+++ b/qpdf/test_driver.cc
@@ -35,6 +35,9 @@
#include <stdlib.h>
#include <string.h>
+#define QPDF_OBJECT_NOWARN
+#include <qpdf/QPDFObject.hh>
+
static char const* whoami = 0;
void
@@ -3298,6 +3301,10 @@ runtest(int n, char const* filename1, char const* arg2)
QPDFObjectHandle uninitialized;
assert(uninitialized.getTypeCode() == ::ot_uninitialized);
assert(strcmp(uninitialized.getTypeName(), "uninitialized") == 0);
+
+ // ABI: until QPDF 12, spot check deprecated constants
+ assert(QPDFObject::ot_unresolved == ::ot_unresolved);
+ assert(QPDFObject::ot_uninitialized == ::ot_uninitialized);
}
QPDF pdf;