summaryrefslogtreecommitdiff
path: root/src/api.c
diff options
context:
space:
mode:
authorKirill Simonov <xi@resolvent.net>2009-02-23 19:59:19 +0000
committerKirill Simonov <xi@resolvent.net>2009-02-23 19:59:19 +0000
commit252c575a5cd67b2207ef79e6b29d6f4d12f21ada (patch)
tree3741e793285211f31b87564f372d22709f437bb4 /src/api.c
parent45bc975e7b3b34f1f6e29c1b2941de14fb815a55 (diff)
downloadlibyaml-git-252c575a5cd67b2207ef79e6b29d6f4d12f21ada.tar.gz
Fixed non-ANSI initializations (fixes #115).
Diffstat (limited to 'src/api.c')
-rw-r--r--src/api.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/api.c b/src/api.c
index 02e7b14..0c4732e 100644
--- a/src/api.c
+++ b/src/api.c
@@ -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;