Commit 790142b5 authored by Daniel Veillard's avatar Daniel Veillard

two nodeset access macros from Thomas Broyer Daniel

* xpath.h: two nodeset access macros from Thomas Broyer
Daniel
parent ba0b8c94
Tue May 15 12:49:50 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* xpath.h: two nodeset access macros from Thomas Broyer
Tue May 15 11:42:39 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* xpath.c xpath.h xpathInternals.h: apply an XPath API cleanup
......
......@@ -266,6 +266,16 @@ typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
/**
* Objects and Nodesets handling
*/
/* These macros may later turn into functions */
#define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0)
#define xmlXPathNodeSetItem(ns, index) \
((((ns) != NULL) && \
((index) > 0) && ((index) <= (ns)->nodeNr)) ? \
(ns)->nodeTab[(index)] \
: NULL)
void xmlXPathFreeObject (xmlXPathObjectPtr obj);
xmlNodeSetPtr xmlXPathNodeSetCreate (xmlNodePtr val);
void xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj);
......
......@@ -266,6 +266,16 @@ typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
/**
* Objects and Nodesets handling
*/
/* These macros may later turn into functions */
#define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0)
#define xmlXPathNodeSetItem(ns, index) \
((((ns) != NULL) && \
((index) > 0) && ((index) <= (ns)->nodeNr)) ? \
(ns)->nodeTab[(index)] \
: NULL)
void xmlXPathFreeObject (xmlXPathObjectPtr obj);
xmlNodeSetPtr xmlXPathNodeSetCreate (xmlNodePtr val);
void xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj);
......
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