diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-22 06:23:48 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-22 06:23:48 +0000 |
| commit | 32c92029f70ed0a041f26307d5ff8e0b4f171515 (patch) | |
| tree | 6ba63b06c5cab5b7bd3a70463442b3be0ee78e21 /ext/syck | |
| parent | 303b994d8f014b16db32906afee58c8592d428b5 (diff) | |
| download | ruby-32c92029f70ed0a041f26307d5ff8e0b4f171515.tar.gz ruby-32c92029f70ed0a041f26307d5ff8e0b4f171515.tar.xz ruby-32c92029f70ed0a041f26307d5ff8e0b4f171515.zip | |
YAML parser don't need identity hash.
revert the part of previous commit.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck')
| -rw-r--r-- | ext/syck/rubyext.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c index 5b056f8e0..2f78b6dda 100644 --- a/ext/syck/rubyext.c +++ b/ext/syck/rubyext.c @@ -837,15 +837,6 @@ syck_parser_bufsize_get(VALUE self) return INT2FIX( parser->bufsize ); } -static VALUE -id_hash_new(void) -{ - VALUE hash; - hash = rb_hash_new(); - rb_funcall(hash, rb_intern("compare_by_identity"), 0); - return hash; -} - /* * YAML::Syck::Parser.load( IO or String ) */ @@ -865,7 +856,7 @@ syck_parser_load(int argc, VALUE *argv, VALUE self) bonus = (struct parser_xtra *)parser->bonus; bonus->taint = syck_parser_assign_io(parser, &port); - bonus->data = id_hash_new(); + bonus->data = rb_hash_new(); bonus->resolver = rb_attr_get( self, s_resolver ); if ( NIL_P( proc ) ) bonus->proc = 0; else bonus->proc = proc; @@ -898,7 +889,7 @@ syck_parser_load_documents(int argc, VALUE *argv, VALUE self) while ( 1 ) { /* Reset hash for tracking nodes */ - bonus->data = id_hash_new(); + bonus->data = rb_hash_new(); /* Parse a document */ v = syck_parse( parser ); @@ -1947,6 +1938,15 @@ syck_emitter_s_alloc(VALUE class) return pobj; } +static VALUE +id_hash_new(void) +{ + VALUE hash; + hash = rb_hash_new(); + rb_funcall(hash, rb_intern("compare_by_identity"), 0); + return hash; +} + /* * YAML::Syck::Emitter.reset( options ) */ |
