summaryrefslogtreecommitdiff
path: root/libtemplate
diff options
context:
space:
mode:
authorManuel Reimer <manuel.reimer@gmx.de>2014-11-12 16:58:01 +0100
committerManuel Reimer <manuel.reimer@gmx.de>2014-11-12 16:58:01 +0100
commitd7aa09fec3c9560edf218b5d0c3badd9d2db5972 (patch)
tree1a18968d819c73ba88143cb15c46326a64e1ee22 /libtemplate
parent234c8559905800413ba281c9cd8c6c1bc612f4c5 (diff)
downloadvdr-plugin-skindesigner-d7aa09fec3c9560edf218b5d0c3badd9d2db5972.tar.gz
vdr-plugin-skindesigner-d7aa09fec3c9560edf218b5d0c3badd9d2db5972.tar.bz2
Init/Cleanup libxml only once at VDR start/end. Copied from xmltv2vdr plugin.
Diffstat (limited to 'libtemplate')
-rw-r--r--libtemplate/xmlparser.c10
-rw-r--r--libtemplate/xmlparser.h4
2 files changed, 11 insertions, 3 deletions
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