1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-26 00:37:43 +03:00

Change the XPath code to percolate allocation errors

looping 1000 time on an error stating that a nodeset has
grown out of control is useless, make sure we percolate
error up to the various loops and break when errors occurs
This commit is contained in:
Daniel Veillard
2012-09-05 15:35:19 +08:00
parent 7d4c529a33
commit 1bd45d1309
2 changed files with 107 additions and 55 deletions

View File

@@ -500,13 +500,13 @@ XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewNodeSet (xmlNodePtr val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewValueTree (xmlNodePtr val);
XMLPUBFUN void XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathNodeSetAdd (xmlNodeSetPtr cur,
xmlNodePtr val);
XMLPUBFUN void XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
xmlNodePtr val);
XMLPUBFUN void XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
xmlNodePtr node,
xmlNsPtr ns);