aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDF.hh2
-rw-r--r--include/qpdf/QUtil.hh11
2 files changed, 12 insertions, 1 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh
index eab64072..a1644f84 100644
--- a/include/qpdf/QPDF.hh
+++ b/include/qpdf/QPDF.hh
@@ -931,7 +931,7 @@ class QPDF
void readHPageOffset(BitStream);
void readHSharedObject(BitStream);
void readHGeneric(BitStream, HGeneric&);
- int maxEnd(ObjUser const& ou);
+ qpdf_offset_t maxEnd(ObjUser const& ou);
qpdf_offset_t getLinearizationOffset(ObjGen const&);
QPDFObjectHandle getUncompressedObject(
QPDFObjectHandle&, std::map<int, int> const& object_stream_data);
diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh
index 9639917d..5b71a362 100644
--- a/include/qpdf/QUtil.hh
+++ b/include/qpdf/QUtil.hh
@@ -27,6 +27,17 @@ namespace QUtil
QPDF_DLL
long long string_to_ll(char const* str);
+ // Pipeline's write method wants unsigned char*, but we often have
+ // some other type of string. These methods do combinations of
+ // const_cast and reinterpret_cast to give us an unsigned char*.
+ // They should only be used when it is known that it is safe.
+ // None of the pipelines in qpdf modify the data passed to them,
+ // so within qpdf, it should always be safe.
+ QPDF_DLL
+ unsigned char* unsigned_char_pointer(std::string const& str);
+ QPDF_DLL
+ unsigned char* unsigned_char_pointer(char const* str);
+
// Throw std::runtime_error with a string formed by appending to
// "description: " the standard string corresponding to the
// current value of errno.