mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
Use struct dom_string for node->proc_instruction.instruction
This commit is contained in:
parent
9935bf2083
commit
0546759b4b
@ -427,8 +427,8 @@ get_dom_node_value(struct dom_node *node, int codepage)
|
||||
break;
|
||||
|
||||
case DOM_NODE_PROCESSING_INSTRUCTION:
|
||||
value = node->data.proc_instruction.instruction;
|
||||
valuelen = node->data.proc_instruction.instructionlen;
|
||||
value = node->data.proc_instruction.instruction.string;
|
||||
valuelen = node->data.proc_instruction.instruction.length;
|
||||
break;
|
||||
|
||||
case DOM_NODE_CDATA_SECTION:
|
||||
|
@ -160,8 +160,7 @@ struct dom_proc_instruction_node {
|
||||
/* The target of the processing instruction (xml for '<?xml ... ?>')
|
||||
* is in the @string / @length members. */
|
||||
/* This holds the value to be processed */
|
||||
unsigned char *instruction;
|
||||
uint16_t instructionlen;
|
||||
struct dom_string instruction;
|
||||
|
||||
/* For fast checking of the target type */
|
||||
uint16_t type; /* enum dom_proc_instruction_type */
|
||||
@ -276,8 +275,7 @@ add_dom_proc_instruction(struct dom_node *parent, unsigned char *string, int len
|
||||
struct dom_node *node = add_dom_node(parent, DOM_NODE_PROCESSING_INSTRUCTION, string, length);
|
||||
|
||||
if (node && instruction) {
|
||||
node->data.proc_instruction.instruction = instruction;
|
||||
node->data.proc_instruction.instructionlen = instructionlen;
|
||||
set_dom_string(&node->data.proc_instruction.instruction, instruction, instructionlen);
|
||||
}
|
||||
|
||||
return node;
|
||||
|
@ -559,8 +559,8 @@ render_dom_proc_instr_source(struct dom_stack *stack, struct dom_node *node, voi
|
||||
|
||||
render_dom_node_text(renderer, &renderer->styles[node->type], node);
|
||||
|
||||
value = node->data.proc_instruction.instruction;
|
||||
valuelen = node->data.proc_instruction.instructionlen;
|
||||
value = node->data.proc_instruction.instruction.string;
|
||||
valuelen = node->data.proc_instruction.instruction.length;
|
||||
|
||||
if (!value || node->data.proc_instruction.map)
|
||||
return node;
|
||||
|
Loading…
Reference in New Issue
Block a user