summaryrefslogtreecommitdiff
path: root/plugins/Variables/parse_xml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Variables/parse_xml.cpp')
-rw-r--r--plugins/Variables/parse_xml.cpp26
1 files changed, 8 insertions, 18 deletions
diff --git a/plugins/Variables/parse_xml.cpp b/plugins/Variables/parse_xml.cpp
index 5d3b5778a0..ae6ad960d1 100644
--- a/plugins/Variables/parse_xml.cpp
+++ b/plugins/Variables/parse_xml.cpp
@@ -63,13 +63,10 @@ static TCHAR *parseXslts(ARGUMENTSINFO *ai) {
if (ai->argc != 3) {
return NULL;
}
-#ifdef UNICODE
+
szStyleSheet = u2a(ai->targv[1]);
szDoc = u2a(ai->targv[2]);
-#else
- szStyleSheet = _strdup(ai->argv[1]);
- szDoc = _strdup(ai->argv[2]);
-#endif
+
log_debugA("calling xsltParseMemory");
sdoc = pXmlParseMemory(szStyleSheet, strlen(szStyleSheet));
@@ -123,11 +120,9 @@ static TCHAR *parseXslts(ARGUMENTSINFO *ai) {
free(szStyleSheet);
log_debugA("calling free");
free(szDoc);
-#ifdef UNICODE
+
tszRes = a2u((char *)xmlChRes);
-#else
- tszRes = _strdup((const char *)xmlChRes);
-#endif
+
log_debugA("calling xmlFree");
pXmlFree(xmlChRes);
@@ -149,13 +144,10 @@ static TCHAR *parseXsltf(ARGUMENTSINFO *ai) {
if (ai->argc != 3) {
return NULL;
}
-#ifdef UNICODE
+
szStyleSheet = u2a(ai->targv[1]);
szDoc = u2a(ai->targv[2]);
-#else
- szStyleSheet = _strdup(ai->argv[1]);
- szDoc = _strdup(ai->argv[2]);
-#endif
+
log_debugA("xslt with %s and %s", szStyleSheet, szDoc);
@@ -206,11 +198,9 @@ static TCHAR *parseXsltf(ARGUMENTSINFO *ai) {
free(szStyleSheet);
free(szDoc);
-#ifdef UNICODE
+
tszRes = a2u((char *)xmlChRes);
-#else
- tszRes = _strdup((const char *)xmlChRes);
-#endif
+
log_debugA("calling xmlFree");
pXmlFree(xmlChRes);