mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +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:
@@ -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
|
||||
|
Reference in New Issue
Block a user