[libxml2] Fix debug dump of streaming XPath expressions
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix debug dump of streaming XPath expressions
- Date: Thu, 7 Sep 2017 17:19:39 +0000 (UTC)
commit ca8635bfc23d67f6a9cce33733981ee768945b69
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Thu Sep 7 15:46:12 2017 +0200
Fix debug dump of streaming XPath expressions
The debug function xmlXPathDebugDumpCompExpr would crash when
called with a "streaming" expression.
Fixes bug 787368.
xpath.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/xpath.c b/xpath.c
index 5b58c8f..2c1b268 100644
--- a/xpath.c
+++ b/xpath.c
@@ -1678,10 +1678,17 @@ xmlXPathDebugDumpCompExpr(FILE *output, xmlXPathCompExprPtr comp,
fprintf(output, "%s", shift);
- fprintf(output, "Compiled Expression : %d elements\n",
- comp->nbStep);
- i = comp->last;
- xmlXPathDebugDumpStepOp(output, comp, &comp->steps[i], depth + 1);
+#ifdef XPATH_STREAMING
+ if (comp->stream) {
+ fprintf(output, "Streaming Expression\n");
+ } else
+#endif
+ {
+ fprintf(output, "Compiled Expression : %d elements\n",
+ comp->nbStep);
+ i = comp->last;
+ xmlXPathDebugDumpStepOp(output, comp, &comp->steps[i], depth + 1);
+ }
}
#ifdef XP_DEBUG_OBJ_USAGE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]