Commit dedede3c authored by Max Kellermann's avatar Max Kellermann

lib/expat/Parser: add method CompleteParse()

parent b14fc907
......@@ -74,6 +74,10 @@ public:
void Parse(const char *data, size_t length, bool is_final);
void CompleteParse() {
Parse("", 0, true);
}
void Parse(InputStream &is);
gcc_pure
......@@ -109,6 +113,10 @@ public:
parser.Parse(std::forward<Args>(args)...);
}
void CompleteParse() {
parser.CompleteParse();
}
gcc_pure
static const char *GetAttribute(const XML_Char **atts,
const char *name) noexcept {
......
......@@ -35,5 +35,5 @@ ExpatParser::Parse(InputStream &is)
Parse(buffer, nbytes, false);
}
Parse("", 0, true);
CompleteParse();
}
......@@ -304,7 +304,7 @@ private:
}
void OnEnd() final {
Parse("", 0, true);
CompleteParse();
LockSetDone();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment