assert(document); /* Non-NULL document object is expected. */
memset(document, 0, sizeof(yaml_document_t));
- if (!STACK_INIT(parser, document->nodes, INITIAL_STACK_SIZE))
+ if (!STACK_INIT(parser, document->nodes, yaml_node_t*))
goto error;
if (!parser->stream_start_produced) {
return 1;
}
- if (!STACK_INIT(parser, parser->aliases, INITIAL_STACK_SIZE))
+ if (!STACK_INIT(parser, parser->aliases, yaml_alias_data_t*))
goto error;
parser->document = document;
if (strcmp((char *)alias_data->anchor, (char *)anchor) == 0) {
yaml_free(anchor);
return yaml_parser_set_composer_error_context(parser,
- "found duplicate anchor; first occurence",
- alias_data->mark, "second occurence", data.mark);
+ "found duplicate anchor; first occurrence",
+ alias_data->mark, "second occurrence", data.mark);
}
}
if (!tag) goto error;
}
- if (!STACK_INIT(parser, items, INITIAL_STACK_SIZE)) goto error;
+ if (!STACK_INIT(parser, items, yaml_node_item_t*)) goto error;
SEQUENCE_NODE_INIT(node, tag, items.start, items.end,
first_event->data.sequence_start.style,
if (!tag) goto error;
}
- if (!STACK_INIT(parser, pairs, INITIAL_STACK_SIZE)) goto error;
+ if (!STACK_INIT(parser, pairs, yaml_node_pair_t*)) goto error;
MAPPING_NODE_INIT(node, tag, pairs.start, pairs.end,
first_event->data.mapping_start.style,