View | Details | Raw Unified | Return to bug 44993
Collapse All | Expand All

(-)src/XMLParser.cpp (-9 / +9 lines)
Lines 46-52 Link Here
46
{
46
{
47
	if (m_parser)
47
	if (m_parser)
48
	{
48
	{
49
		XML_ParserFree(m_parser);
49
		XML_ParserFree((XML_Parser) m_parser);
50
		m_parser = 0;
50
		m_parser = 0;
51
	}
51
	}
52
}
52
}
Lines 56-82 Link Here
56
{
56
{
57
	FreeParser();
57
	FreeParser();
58
	m_parser = XML_ParserCreateNS(encoding, '#');
58
	m_parser = XML_ParserCreateNS(encoding, '#');
59
	XML_SetElementHandler(m_parser,
59
	XML_SetElementHandler((XML_Parser) m_parser,
60
			XMLParser::_startElement,
60
			XMLParser::_startElement,
61
			XMLParser::_endElement);
61
			XMLParser::_endElement);
62
62
63
	XML_SetCharacterDataHandler(m_parser,
63
	XML_SetCharacterDataHandler((XML_Parser) m_parser,
64
			XMLParser::_characterData);
64
			XMLParser::_characterData);
65
65
66
	XML_SetStartNamespaceDeclHandler(m_parser,
66
	XML_SetStartNamespaceDeclHandler((XML_Parser) m_parser,
67
			XMLParser::_startNamespace);
67
			XMLParser::_startNamespace);
68
68
69
	XML_SetEndNamespaceDeclHandler(m_parser,
69
	XML_SetEndNamespaceDeclHandler((XML_Parser) m_parser,
70
			XMLParser::_endNamespace);
70
			XMLParser::_endNamespace);
71
71
72
	XML_SetUserData(m_parser, this);
72
	XML_SetUserData((XML_Parser) m_parser, this);
73
}
73
}
74
74
75
void *
75
void *
76
XMLParser::GetParseBuffer(int size)
76
XMLParser::GetParseBuffer(int size)
77
{
77
{
78
	if (m_parser)
78
	if (m_parser)
79
		return XML_GetBuffer(m_parser, size);
79
		return XML_GetBuffer((XML_Parser) m_parser, size);
80
	return 0;
80
	return 0;
81
}
81
}
82
82
Lines 84-90 Link Here
84
XMLParser::ParseBuffer(int size)
84
XMLParser::ParseBuffer(int size)
85
{
85
{
86
	if (m_parser)
86
	if (m_parser)
87
		return XML_ParseBuffer(m_parser, size, size == 0) != 0;
87
		return XML_ParseBuffer((XML_Parser) m_parser, size, size == 0) != 0;
88
	return false;
88
	return false;
89
}
89
}
90
90
Lines 92-98 Link Here
92
XMLParser::GetErrorMessage()
92
XMLParser::GetErrorMessage()
93
{
93
{
94
	if (m_parser)
94
	if (m_parser)
95
		return XML_ErrorString(XML_GetErrorCode(m_parser));
95
		return XML_ErrorString(XML_GetErrorCode((XML_Parser) m_parser));
96
	return 0;
96
	return 0;
97
}
97
}

Return to bug 44993