diff options
author | Kirill Simonov <xi@resolvent.net> | 2009-02-23 19:59:19 +0000 |
---|---|---|
committer | Kirill Simonov <xi@resolvent.net> | 2009-02-23 19:59:19 +0000 |
commit | 252c575a5cd67b2207ef79e6b29d6f4d12f21ada (patch) | |
tree | 3741e793285211f31b87564f372d22709f437bb4 /src/api.c | |
parent | 45bc975e7b3b34f1f6e29c1b2941de14fb815a55 (diff) | |
download | libyaml-git-252c575a5cd67b2207ef79e6b29d6f4d12f21ada.tar.gz |
Fixed non-ANSI initializations (fixes #115).
Diffstat (limited to 'src/api.c')
-rw-r--r-- | src/api.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1365,7 +1365,8 @@ yaml_document_append_mapping_pair(yaml_document_t *document, struct { yaml_error_type_t error; } context; - yaml_node_pair_t pair = { key, value }; + + yaml_node_pair_t pair; assert(document); /* Non-NULL document is required. */ assert(mapping > 0 @@ -1378,6 +1379,9 @@ yaml_document_append_mapping_pair(yaml_document_t *document, assert(value > 0 && document->nodes.start + value <= document->nodes.top); /* Valid value id is required. */ + pair.key = key; + pair.value = value; + if (!PUSH(&context, document->nodes.start[mapping-1].data.mapping.pairs, pair)) return 0; |