From 5f69255cbcc75cc47b47e988a39002911c1c041a Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sat, 10 Dec 2005 19:21:12 +0100 Subject: [PATCH] get_dom_node_map_entry(): take name as a dom_string Requires that dom_string->length becomes a size_t. --- src/document/dom/node.c | 4 ++-- src/document/dom/node.h | 2 +- src/document/dom/string.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/document/dom/node.c b/src/document/dom/node.c index 043f553f8..0f37e6069 100644 --- a/src/document/dom/node.c +++ b/src/document/dom/node.c @@ -211,9 +211,9 @@ int get_dom_node_map_index(struct dom_node_list *list, struct dom_node *node) struct dom_node * get_dom_node_map_entry(struct dom_node_list *list, enum dom_node_type type, - uint16_t subtype, unsigned char *name, int namelen) + uint16_t subtype, struct dom_string *name) { - struct dom_node node = { type, INIT_DOM_STRING(name, namelen) }; + struct dom_node node = { type, INIT_DOM_STRING(name->string, name->length) }; struct dom_node_search search = INIT_DOM_NODE_SEARCH(&node, subtype, list); return dom_node_list_bsearch(&search, list); diff --git a/src/document/dom/node.h b/src/document/dom/node.h index 6313f9b61..a9428cfb5 100644 --- a/src/document/dom/node.h +++ b/src/document/dom/node.h @@ -243,7 +243,7 @@ int get_dom_node_map_index(struct dom_node_list *list, struct dom_node *node); struct dom_node * get_dom_node_map_entry(struct dom_node_list *node_map, enum dom_node_type type, uint16_t subtype, - unsigned char *name, int namelen); + struct dom_string *name); struct dom_node * init_dom_node_(unsigned char *file, int line, diff --git a/src/document/dom/string.h b/src/document/dom/string.h index 5956bea1d..cc46faa18 100644 --- a/src/document/dom/string.h +++ b/src/document/dom/string.h @@ -2,7 +2,7 @@ #define EL__DOCUMENT_DOM_STRING_H struct dom_string { - uint16_t length; + size_t length; unsigned char *string; };