From c56a9ca7f6484925627aa1da374a236949c07cb2 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 21 May 2022 09:05:54 -0400 Subject: JSON: Fix large file support --- include/qpdf/JSON.hh | 13 +++++++------ include/qpdf/QPDF.hh | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/qpdf/JSON.hh b/include/qpdf/JSON.hh index e6857ca6..64a593d0 100644 --- a/include/qpdf/JSON.hh +++ b/include/qpdf/JSON.hh @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -299,13 +300,13 @@ class JSON // non-inclusive end offsets of an object relative to its input // string. Otherwise, both values are 0. QPDF_DLL - void setStart(size_t); + void setStart(qpdf_offset_t); QPDF_DLL - void setEnd(size_t); + void setEnd(qpdf_offset_t); QPDF_DLL - size_t getStart() const; + qpdf_offset_t getStart() const; QPDF_DLL - size_t getEnd() const; + qpdf_offset_t getEnd() const; private: static std::string encode_string(std::string const& utf8); @@ -391,8 +392,8 @@ class JSON std::shared_ptr value; // start and end are only populated for objects created by parse - size_t start; - size_t end; + qpdf_offset_t start; + qpdf_offset_t end; }; std::shared_ptr m; diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index 07a384d7..8ddbf98b 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -1046,7 +1046,7 @@ class QPDF void nestedState(std::string const& key, JSON const& value, state_e); void setObjectDescription(QPDFObjectHandle& oh, JSON const& value); QPDFObjectHandle makeObject(JSON const& value); - void error(size_t offset, std::string const& message); + void error(qpdf_offset_t offset, std::string const& message); QPDFObjectHandle reserveObject(int obj, int gen); void replaceObject( -- cgit v1.2.3-54-g00ecf