mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +03:00
fixing an XPath function evalutation bug pointed out by Alexey Efimov
* xpath.c: fixing an XPath function evalutation bug pointed out by Alexey Efimov where the context was lost when evaluating the function arguments Daniel
This commit is contained in:
@ -1,4 +1,11 @@
|
|||||||
|
Tue May 14 13:00:48 CEST 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* xpath.c: fixing an XPath function evalutation bug pointed out
|
||||||
|
by Alexey Efimov where the context was lost when evaluating
|
||||||
|
the function arguments
|
||||||
|
|
||||||
Mon 13 May 2002 11:37:39 PM PDT Aleksey Sanin <aleksey@aleksey.com>
|
Mon 13 May 2002 11:37:39 PM PDT Aleksey Sanin <aleksey@aleksey.com>
|
||||||
|
|
||||||
* xpath.c include/libxml/xpathInternals.h: maked xmlXPathNodeSetAddNs()
|
* xpath.c include/libxml/xpathInternals.h: maked xmlXPathNodeSetAddNs()
|
||||||
function public for XMLSec performance optimizations
|
function public for XMLSec performance optimizations
|
||||||
|
|
||||||
|
6
xpath.c
6
xpath.c
@ -9861,11 +9861,17 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
|
|||||||
return (total);
|
return (total);
|
||||||
}
|
}
|
||||||
case XPATH_OP_ARG:
|
case XPATH_OP_ARG:
|
||||||
|
bakd = ctxt->context->doc;
|
||||||
|
bak = ctxt->context->node;
|
||||||
if (op->ch1 != -1)
|
if (op->ch1 != -1)
|
||||||
total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
|
total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
|
||||||
|
ctxt->context->doc = bakd;
|
||||||
|
ctxt->context->node = bak;
|
||||||
CHECK_ERROR0;
|
CHECK_ERROR0;
|
||||||
if (op->ch2 != -1)
|
if (op->ch2 != -1)
|
||||||
total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
|
total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
|
||||||
|
ctxt->context->doc = bakd;
|
||||||
|
ctxt->context->node = bak;
|
||||||
CHECK_ERROR0;
|
CHECK_ERROR0;
|
||||||
return (total);
|
return (total);
|
||||||
case XPATH_OP_PREDICATE:
|
case XPATH_OP_PREDICATE:
|
||||||
|
Reference in New Issue
Block a user