diff --git a/src/document/dom/node.c b/src/document/dom/node.c index 121b6b4a..6a8987e7 100644 --- a/src/document/dom/node.c +++ b/src/document/dom/node.c @@ -134,8 +134,8 @@ struct dom_node_search { #define INIT_DOM_NODE_SEARCH(key, list) \ { (key), -1, 0, (list)->size, } -static inline int -dom_node_cmp(struct dom_node *node1, struct dom_node *node2) +int +dom_node_casecmp(struct dom_node *node1, struct dom_node *node2) { if (node1->type == node2->type) { switch (node1->type) { @@ -176,7 +176,7 @@ dom_node_list_bsearch(struct dom_node_search *search, struct dom_node_list *list do { int pos = get_bsearch_position(list, search->from, search->to); struct dom_node *node = list->entries[pos]; - int difference = dom_node_cmp(search->key, node); + int difference = dom_node_casecmp(search->key, node); search->pos = pos; diff --git a/src/document/dom/node.h b/src/document/dom/node.h index 10a70381..b52190db 100644 --- a/src/document/dom/node.h +++ b/src/document/dom/node.h @@ -286,6 +286,9 @@ add_dom_proc_instruction(struct dom_node *parent, unsigned char *string, int len /* Removes the node and all its children and free()s itself */ void done_dom_node(struct dom_node *node); +/* Compare two nodes returning non-zero if they differ. */ +int dom_node_casecmp(struct dom_node *node1, struct dom_node *node2); + /* Returns the name of the node in an allocated string. */ struct dom_string *get_dom_node_name(struct dom_node *node);