MCPcopy Create free account
hub / github.com/Kitware/CMake / CleanupParser

Method CleanupParser

Source/cmXMLParser.cxx:85–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85int cmXMLParser::CleanupParser()
86{
87 if (!this->Parser) {
88 std::cerr << "Parser not initialized" << std::endl;
89 this->ParseError = 1;
90 return 0;
91 }
92 int result = !this->ParseError;
93 if (result) {
94 // Tell the expat XML parser about the end-of-input.
95 if (!XML_Parse(static_cast<XML_Parser>(this->Parser), "", 0, 1)) {
96 this->ReportXmlParseError();
97 result = 0;
98 }
99 }
100
101 // Clean up the parser.
102 XML_ParserFree(static_cast<XML_Parser>(this->Parser));
103 this->Parser = nullptr;
104
105 return result;
106}
107
108int cmXMLParser::ParseBuffer(char const* buffer, std::string::size_type count)
109{

Callers 5

~cmXMLParserMethod · 0.95
ParseMethod · 0.95
~LogParserMethod · 0.45
~LogParserMethod · 0.45
~LogParserMethod · 0.45

Calls 3

ReportXmlParseErrorMethod · 0.95
XML_ParseFunction · 0.85
XML_ParserFreeFunction · 0.85

Tested by 3

~LogParserMethod · 0.36
~LogParserMethod · 0.36
~LogParserMethod · 0.36