Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: third_party/libxml/src/xpath.c

Issue 2792873002: Roll libxml to e905f08123e4a6e7731549e6f09dadff4cab65bd (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libxml/src/xmlIO.c ('k') | third_party/libxml/src/xpointer.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libxml/src/xpath.c
diff --git a/third_party/libxml/src/xpath.c b/third_party/libxml/src/xpath.c
index 7c24a824ec0c48a3b95f965150c9f6fa688a56aa..79ea535924ca1afa5e4c87085479a330e106a522 100644
--- a/third_party/libxml/src/xpath.c
+++ b/third_party/libxml/src/xpath.c
@@ -935,7 +935,7 @@ struct _xmlXPathStepOp {
int value3;
void *value4;
void *value5;
- void *cache;
+ xmlXPathFunction cache;
void *cacheURI;
};
@@ -3342,13 +3342,13 @@ xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2) {
* compute depth to root
*/
for (depth2 = 0, cur = node2;cur->parent != NULL;cur = cur->parent) {
- if (cur == node1)
+ if (cur->parent == node1)
return(1);
depth2++;
}
root = cur;
for (depth1 = 0, cur = node1;cur->parent != NULL;cur = cur->parent) {
- if (cur == node2)
+ if (cur->parent == node2)
return(-1);
depth1++;
}
@@ -10698,9 +10698,11 @@ xmlXPathCompPathExpr(xmlXPathParserContextPtr ctxt) {
"PathExpr: Type search\n");
#endif
lc = 1;
+#ifdef LIBXML_XPTR_ENABLED
} else if (ctxt->xptr &&
xmlStrEqual(name, BAD_CAST "range-to")) {
lc = 1;
+#endif
} else {
#ifdef DEBUG_STEP
xmlGenericError(xmlGenericErrorContext,
@@ -13563,7 +13565,7 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
}
}
if (op->cache != NULL)
- XML_CAST_FPTR(func) = op->cache;
+ func = op->cache;
else {
const xmlChar *URI = NULL;
@@ -13590,7 +13592,7 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
(char *)op->value4);
XP_ERROR0(XPATH_UNKNOWN_FUNC_ERROR);
}
- op->cache = XML_CAST_FPTR(func);
+ op->cache = func;
op->cacheURI = (void *) URI;
}
oldFunc = ctxt->context->function;
« no previous file with comments | « third_party/libxml/src/xmlIO.c ('k') | third_party/libxml/src/xpointer.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698