From d7aa09fec3c9560edf218b5d0c3badd9d2db5972 Mon Sep 17 00:00:00 2001 From: Manuel Reimer Date: Wed, 12 Nov 2014 16:58:01 +0100 Subject: Init/Cleanup libxml only once at VDR start/end. Copied from xmltv2vdr plugin. --- libtemplate/xmlparser.c | 10 ++++++++-- libtemplate/xmlparser.h | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'libtemplate') diff --git a/libtemplate/xmlparser.c b/libtemplate/xmlparser.c index 0e2c132..23912b7 100644 --- a/libtemplate/xmlparser.c +++ b/libtemplate/xmlparser.c @@ -12,7 +12,6 @@ cXmlParser::cXmlParser(void) { root = NULL; ctxt = NULL; - xmlInitParser(); initGenericErrorDefaultFunc(NULL); xmlSetStructuredErrorFunc(NULL, SkinDesignerXMLErrorHandler); ctxt = xmlNewParserCtxt(); @@ -21,7 +20,6 @@ cXmlParser::cXmlParser(void) { cXmlParser::~cXmlParser() { DeleteDocument(); xmlFreeParserCtxt(ctxt); - xmlCleanupParser(); } /********************************************************************* @@ -737,3 +735,11 @@ bool cXmlParser::DebugViewElement(xmlNodePtr node) { } return false; } + +void cXmlParser::InitLibXML() { + xmlInitParser(); +} + +void cXmlParser::CleanupLibXML() { + xmlCleanupParser(); +} diff --git a/libtemplate/xmlparser.h b/libtemplate/xmlparser.h index ecdcca3..cba1eb4 100644 --- a/libtemplate/xmlparser.h +++ b/libtemplate/xmlparser.h @@ -51,6 +51,8 @@ public: bool ParseView(void); bool ParseGlobals(void); void DeleteDocument(void); + static void InitLibXML(); + static void CleanupLibXML(); }; -#endif //__XMLPARSER_H \ No newline at end of file +#endif //__XMLPARSER_H -- cgit v1.2.3