From f5a6a36471123985aa452b6c03d1667c4e447d29 Mon Sep 17 00:00:00 2001 From: why Date: Wed, 14 May 2003 20:01:09 +0000 Subject: * ext/syck/gram.c: sequence-in-map shortcut, transfer methods on sequence-in-sequence, memory leak in mapping merge. [0.28] * ext/syck/syck.c: memory leak in domain anchoring. [0.28] * lib/yaml/rubytypes.rb, lib/yaml/types.rb: eliminated 1.6.x code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/syck/node.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'ext/syck/node.c') 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 ) { -- cgit v1.2.3