diff options
author | deva <deva> | 2008-05-15 14:19:02 +0000 |
---|---|---|
committer | deva <deva> | 2008-05-15 14:19:02 +0000 |
commit | 63d7e433f104dd13d015df3a048697fad6d43a55 (patch) | |
tree | 4dedec10891f4e9866ba5b3f9bfcd136cc0c7e16 /server/src/saxparser.cc | |
parent | dd744c562f2f755a9fcd9ee5341c8c8702a9ee32 (diff) |
Added a lot of testcode... and fixed a lot of minor error (-Wall -Werror)
Diffstat (limited to 'server/src/saxparser.cc')
-rw-r--r-- | server/src/saxparser.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/src/saxparser.cc b/server/src/saxparser.cc index e0d849a..2eabf38 100644 --- a/server/src/saxparser.cc +++ b/server/src/saxparser.cc @@ -68,6 +68,11 @@ SAXParser::SAXParser() XML_SetElementHandler(p, start_hndl, end_hndl); } +SAXParser::~SAXParser() +{ + XML_ParserFree(p); +} + int SAXParser::parse() { char buf[32]; @@ -77,7 +82,7 @@ int SAXParser::parse() len = readData(buf, sizeof(buf) - 1); if (! XML_Parse(p, buf, len, len == 0)) { fprintf(stderr, "Parse error at line %d:\n%s\n", - XML_GetCurrentLineNumber(p), + (int)XML_GetCurrentLineNumber(p), XML_ErrorString(XML_GetErrorCode(p))); return -1; } |