- libxslt/extra.c libxslt/variables.c: fixing compilation
authorDaniel Veillard <veillard@src.gnome.org>
Mon, 12 Mar 2001 13:44:27 +0000 (13:44 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Mon, 12 Mar 2001 13:44:27 +0000 (13:44 +0000)
  when libxml was compiled without debug support
Daniel

ChangeLog
libxslt/extra.c
libxslt/variables.c

index fc6fc1e..f1059d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Mar 12 14:43:20 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+       * libxslt/extra.c libxslt/variables.c: fixing compilation
+         when libxml was compiled without debug support
+
 Sat Mar 10 13:50:16 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
 
        * configure.in: time for 0.5.0
index 1138097..4677595 100644 (file)
@@ -19,6 +19,7 @@
 #include <libxml/hash.h>
 #include <libxml/xmlerror.h>
 #include <libxml/parserInternals.h>
+#include <libxml/xmlversion.h>
 #include "xslt.h"
 #include "xsltInternals.h"
 #include "xsltutils.h"
@@ -80,11 +81,13 @@ xsltDebug(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst,
                fprintf(stdout, "%s ", cur->name);
            else
                fprintf(stdout, "noname !!!!");
+#ifdef LIBXML_DEBUG_ENABLED
            if (cur->value != NULL) {
                xmlXPathDebugDumpObject(stdout, cur->value, 1);
            } else {
                fprintf(stdout, "NULL !!!!");
            }
+#endif
            fprintf(stdout, "\n");
            cur = cur->next;
        }
index ace114d..f6560af 100644 (file)
@@ -21,6 +21,7 @@
 #include <libxml/xpath.h>
 #include <libxml/xpathInternals.h>
 #include <libxml/parserInternals.h>
+#include <libxml/xmlversion.h>
 #include "xslt.h"
 #include "xsltInternals.h"
 #include "xsltutils.h"
@@ -277,11 +278,13 @@ xsltEvalVariables(xsltTransformContextPtr ctxt, xsltStackElemPtr elem) {
            xmlXPathFreeParserContext(xpathParserCtxt);
        if (result != NULL) {
 #ifdef DEBUG_VARIABLE
+#ifdef LIBXML_DEBUG_ENABLED
            if ((xsltGenericDebugContext == stdout) ||
                (xsltGenericDebugContext == stderr))
                xmlXPathDebugDumpObject((FILE *)xsltGenericDebugContext,
                                        result, 0);
 #endif
+#endif
            if (elem->value != NULL)
                xmlXPathFreeObject(elem->value);
            elem->value = result;
@@ -316,11 +319,13 @@ xsltEvalVariables(xsltTransformContextPtr ctxt, xsltStackElemPtr elem) {
                elem->value = xmlXPathNewCString("");
            }
 #ifdef DEBUG_VARIABLE
+#ifdef LIBXML_DEBUG_ENABLED
            if ((xsltGenericDebugContext == stdout) ||
                (xsltGenericDebugContext == stderr))
                xmlXPathDebugDumpObject((FILE *)xsltGenericDebugContext,
                                        elem->value, 0);
 #endif
+#endif
        }
        elem->computed = 1;
     }