aboutsummaryrefslogtreecommitdiffstats
path: root/include/qpdf/QPDF.hh
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-05-21 13:41:09 +0200
committerJay Berkenbilt <ejb@ql.org>2022-05-21 14:43:21 +0200
commit47c093c48b7ac3eb97c33b8edfafdf89685cffc7 (patch)
tree94f9f9922dc5dffaaf2ac73e4f30b8832e9d6403 /include/qpdf/QPDF.hh
parent9b2eb01e2505e301ce95d31f5387fea0de35eff0 (diff)
downloadqpdf-47c093c48b7ac3eb97c33b8edfafdf89685cffc7.tar.zst
Replace std::regex with validators for better performance
Diffstat (limited to 'include/qpdf/QPDF.hh')
-rw-r--r--include/qpdf/QPDF.hh6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh
index b4f03599..07a384d7 100644
--- a/include/qpdf/QPDF.hh
+++ b/include/qpdf/QPDF.hh
@@ -867,6 +867,9 @@ class QPDF
};
friend class Pipe;
+ // For testing only -- do not add to DLL
+ static bool test_json_validators();
+
private:
static std::string const qpdf_version;
@@ -1045,7 +1048,7 @@ class QPDF
QPDFObjectHandle makeObject(JSON const& value);
void error(size_t offset, std::string const& message);
QPDFObjectHandle
- reserveObject(std::string const& obj, std::string const& gen);
+ reserveObject(int obj, int gen);
void replaceObject(
QPDFObjectHandle to_replace,
QPDFObjectHandle replacement,
@@ -1500,6 +1503,7 @@ class QPDF
};
// Methods to support pattern finding
+ static bool validatePDFVersion(char const*&, std::string& version);
bool findHeader();
bool findStartxref();
bool findEndstream();