mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
- xpath.c include/libxml/xpath.h include/libxml/xpathInternals.h:
lot of optimization work, results in significant improvements when handling really complex XPath queries. Add a small optimizer for unions, improve [n] and [last()], avoid some costly ops. Daniel
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
Tue Jul 3 10:12:03 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
|
* xpath.c include/libxml/xpath.h include/libxml/xpathInternals.h:
|
||||||
|
lot of optimization work, results in significant improvements
|
||||||
|
when handling really complex XPath queries. Add a small optimizer
|
||||||
|
for unions, improve [n] and [last()], avoid some costly ops.
|
||||||
|
|
||||||
Fri Jun 29 23:26:54 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
Fri Jun 29 23:26:54 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
* include/libxml/parser.h parser.c: xmlStrstr args are both const
|
* include/libxml/parser.h parser.c: xmlStrstr args are both const
|
||||||
|
@ -255,6 +255,7 @@ struct _xmlXPathParserContext {
|
|||||||
|
|
||||||
xmlXPathCompExprPtr comp; /* the precompiled expression */
|
xmlXPathCompExprPtr comp; /* the precompiled expression */
|
||||||
int xptr; /* it this an XPointer expression */
|
int xptr; /* it this an XPointer expression */
|
||||||
|
xmlNodePtr ancestor; /* used for walking preceding axis */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -74,6 +74,17 @@ extern "C" {
|
|||||||
if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
|
if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
|
||||||
XP_ERROR(XPATH_INVALID_TYPE)
|
XP_ERROR(XPATH_INVALID_TYPE)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CHECK_TYPE0:
|
||||||
|
* @typeval: the XPath type
|
||||||
|
*
|
||||||
|
* Macro to check that the value on top of the XPath stack is of a given
|
||||||
|
* type. return(0) in case of failure
|
||||||
|
*/
|
||||||
|
#define CHECK_TYPE0(typeval) \
|
||||||
|
if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
|
||||||
|
XP_ERROR0(XPATH_INVALID_TYPE)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CHECK_ARITY:
|
* CHECK_ARITY:
|
||||||
* @x: the number of expected args
|
* @x: the number of expected args
|
||||||
|
Reference in New Issue
Block a user