summaryrefslogtreecommitdiff
path: root/ext/syck/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/syck/node.c')
-rw-r--r--ext/syck/node.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/syck/node.c b/ext/syck/node.c
index 182ffee98b..26a9bdd0a5 100644
--- a/ext/syck/node.c
+++ b/ext/syck/node.c
@@ -22,6 +22,7 @@ syck_alloc_node( enum syck_kind_tag type )
s->id = 0;
s->type_id = NULL;
s->anchor = NULL;
+ s->shortcut = NULL;
return s;
}
@@ -207,6 +208,24 @@ syck_map_count( SyckNode *map )
return map->data.pairs->idx;
}
+void
+syck_map_assign( SyckNode *map, enum map_part p, long idx, SYMID id )
+{
+ struct SyckMap *m;
+
+ ASSERT( map != NULL );
+ m = map->data.pairs;
+ ASSERT( m != NULL );
+ if ( p == map_key )
+ {
+ m->keys[idx] = id;
+ }
+ else
+ {
+ m->values[idx] = id;
+ }
+}
+
SYMID
syck_map_read( SyckNode *map, enum map_part p, long idx )
{