mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
init_dom_stack(): Drop unused object_size argument
This commit is contained in:
parent
f8d48e81eb
commit
632f12f82a
@ -376,7 +376,7 @@ parse_dom_select(struct dom_select *select, unsigned char *string, int length)
|
||||
struct dom_select_node sel;
|
||||
|
||||
init_scanner(&scanner, &css_scanner_info, string, string + length);
|
||||
init_dom_stack(&stack, 0, 1);
|
||||
init_dom_stack(&stack, 1);
|
||||
|
||||
memset(&sel, 0, sizeof(sel));
|
||||
|
||||
@ -869,11 +869,11 @@ select_dom_nodes(struct dom_select *select, struct dom_node *root)
|
||||
|
||||
select_data.select = select;;
|
||||
|
||||
init_dom_stack(&stack, 0, 1);
|
||||
init_dom_stack(&stack, 1);
|
||||
add_dom_stack_context(&stack, &select_data,
|
||||
&dom_select_context_info);
|
||||
|
||||
init_dom_stack(&select_data.stack, 0, 1);
|
||||
init_dom_stack(&select_data.stack, 1);
|
||||
add_dom_stack_context(&stack, &select_data,
|
||||
&dom_select_data_context_info);
|
||||
|
||||
|
@ -53,7 +53,7 @@ realloc_dom_stack_state_objects(struct dom_stack_context *context, size_t depth)
|
||||
}
|
||||
|
||||
void
|
||||
init_dom_stack(struct dom_stack *stack, size_t object_size, int keep_nodes)
|
||||
init_dom_stack(struct dom_stack *stack, int keep_nodes)
|
||||
{
|
||||
assert(stack);
|
||||
|
||||
|
@ -11,6 +11,9 @@ struct dom_stack;
|
||||
typedef void (*dom_stack_callback_T)(struct dom_stack *, struct dom_node *, void *);
|
||||
|
||||
struct dom_stack_context_info {
|
||||
/* The @object_size member tells whether the stack should allocate
|
||||
* objects for each state to be assigned to the state's @data member.
|
||||
* Zero means no state data should be allocated. */
|
||||
size_t object_size;
|
||||
dom_stack_callback_T push[DOM_NODES];
|
||||
dom_stack_callback_T pop[DOM_NODES];
|
||||
@ -118,10 +121,7 @@ search_dom_stack(struct dom_stack *stack, enum dom_node_type type,
|
||||
|
||||
/* Life cycle functions. */
|
||||
|
||||
/* The @object_size arg tells whether the stack should allocate objects for each
|
||||
* state to be assigned to the state's @data member. Zero means no state data should
|
||||
* be allocated. */
|
||||
void init_dom_stack(struct dom_stack *stack, size_t object_size, int keep_nodes);
|
||||
void init_dom_stack(struct dom_stack *stack, int keep_nodes);
|
||||
void done_dom_stack(struct dom_stack *stack);
|
||||
|
||||
/* Add a callback collection to the stack. */
|
||||
|
@ -361,8 +361,7 @@ init_sgml_parser(enum sgml_parser_type type, enum sgml_document_type doctype,
|
||||
parser->uri = get_uri_reference(uri);
|
||||
parser->info = get_sgml_info(doctype);
|
||||
|
||||
init_dom_stack(&parser->stack, 0,
|
||||
type != SGML_PARSER_STREAM);
|
||||
init_dom_stack(&parser->stack, type != SGML_PARSER_STREAM);
|
||||
/* FIXME: Some sgml backend specific callbacks? Handle HTML script tags,
|
||||
* and feed document.write() data back to the parser. */
|
||||
add_dom_stack_context(&parser->stack, parser, &sgml_parser_context_info);
|
||||
|
Loading…
Reference in New Issue
Block a user