Commit f06307e2 authored by Daniel Veillard's avatar Daniel Veillard

- 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
parent 77044731
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>
* include/libxml/parser.h parser.c: xmlStrstr args are both const
......
......@@ -255,6 +255,7 @@ struct _xmlXPathParserContext {
xmlXPathCompExprPtr comp; /* the precompiled 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)) \
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:
* @x: the number of expected args
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment