[libxslt] Make xsltDebug more quiet



commit 68d03699f2e0025c12a7ddd0b0d06e58a520083d
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Mon May 22 12:52:15 2017 +0200

    Make xsltDebug more quiet
    
    Only call xmlXPathDebugDumpObject if the debug context is stdout or
    stderr.

 libxslt/extra.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libxslt/extra.c b/libxslt/extra.c
index 2c99e4c..2be0eec 100644
--- a/libxslt/extra.c
+++ b/libxslt/extra.c
@@ -96,7 +96,10 @@ xsltDebug(xsltTransformContextPtr ctxt, xmlNodePtr node ATTRIBUTE_UNUSED,
                 xsltGenericError(xsltGenericErrorContext, "noname !!!!");
 #ifdef LIBXML_DEBUG_ENABLED
             if (cur->value != NULL) {
-                xmlXPathDebugDumpObject(stdout, cur->value, 1);
+                if ((xsltGenericDebugContext == stdout) ||
+                    (xsltGenericDebugContext == stderr))
+                    xmlXPathDebugDumpObject((FILE*)xsltGenericDebugContext,
+                                            cur->value, 1);
             } else {
                 xsltGenericError(xsltGenericErrorContext, "NULL !!!!");
             }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]