diff options
author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-01-10 04:54:10 +0000 |
---|---|---|
committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-01-10 04:54:10 +0000 |
commit | 138ec303437d6d813f9d386c14cf6b368a2f9393 (patch) | |
tree | d54fe740e72249c9e91a90d05ae5ab0e5c611bca /ext | |
parent | 0f8bc84d639b1f96f29ba2a9d62e648a84445504 (diff) | |
download | ruby-138ec303437d6d813f9d386c14cf6b368a2f9393.tar.gz ruby-138ec303437d6d813f9d386c14cf6b368a2f9393.tar.xz ruby-138ec303437d6d813f9d386c14cf6b368a2f9393.zip |
Sorry, commit miss.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/syck/rubyext.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c index a4717e4f3..14dbd9cb6 100644 --- a/ext/syck/rubyext.c +++ b/ext/syck/rubyext.c @@ -115,14 +115,14 @@ rb_syck_compile(self, port) oid = syck_parse( parser ); syck_lookup_sym( parser, oid, (char **)&sav ); - ret = S_ALLOC_N( char, strlen( sav->buffer ) + 3 ); + ret = S_ALLOCA_N( char, strlen( sav->buffer ) + 3 ); ret[0] = '\0'; strcat( ret, "D\n" ); strcat( ret, sav->buffer ); syck_free_parser( parser ); - bc = rb_str_new2( ret ); S_FREE( ret ); + bc = rb_str_new2( ret ); if ( taint ) OBJ_TAINT( bc ); return bc; } @@ -1043,12 +1043,11 @@ syck_set_ivars( vars, obj ) VALUE ivname = rb_ary_entry( vars, 0 ); char *ivn; StringValue( ivname ); - ivn = S_ALLOC_N( char, RSTRING(ivname)->len + 2 ); + ivn = S_ALLOCA_N( char, RSTRING(ivname)->len + 2 ); ivn[0] = '@'; ivn[1] = '\0'; strncat( ivn, RSTRING(ivname)->ptr, RSTRING(ivname)->len ); rb_iv_set( obj, ivn, rb_ary_entry( vars, 1 ) ); - S_FREE( ivn ); return Qnil; } |