ruby-changes:14883
From: matz <ko1@a...>
Date: Wed, 24 Feb 2010 23:17:22 +0900 (JST)
Subject: [ruby-changes:14883] Ruby:r26751 (trunk): * marshal.c (r_object0): should prepare placeholder before
matz 2010-02-24 23:16:59 +0900 (Wed, 24 Feb 2010) New Revision: 26751 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26751 Log: * marshal.c (r_object0): should prepare placeholder before processing instance variables. [ruby-dev:40414] * marshal.c (id2encidx): no longer need arg. Modified files: trunk/ChangeLog trunk/marshal.c Index: ChangeLog =================================================================== --- ChangeLog (revision 26750) +++ ChangeLog (revision 26751) @@ -50,6 +50,13 @@ * symbian/setup (config.h): HAVE_STRUCT_TIMEZONE, VOID_UNSETENV, and RUBY_LIB_VERSION_STYLE defined. * symbian/setup (ruby.mmp): SOURCE node.c added. +Sat Feb 20 14:42:19 2010 Yukihiro Matsumoto <matz@r...> + + * marshal.c (r_object0): should prepare placeholder before + processing instance variables. [ruby-dev:40414] + + * marshal.c (id2encidx): no longer need arg. + Sat Feb 20 14:36:16 2010 Yukihiro Matsumoto <matz@r...> * vm.c (vm_backtrace_each): use called_id when method definition Index: marshal.c =================================================================== --- marshal.c (revision 26750) +++ marshal.c (revision 26751) @@ -1126,7 +1126,7 @@ } static int -id2encidx(ID id, VALUE val, struct load_arg *arg) +id2encidx(ID id, VALUE val) { if (id == rb_id_encoding()) { int idx = rb_enc_find_index(StringValueCStr(val)); @@ -1165,7 +1165,7 @@ long num = r_long(arg); while (num-- > 0) { id = r_symbol(arg); - idx = id2encidx(id, r_object(arg), arg); + idx = id2encidx(id, r_object(arg)); } } if (idx < 0) idx = rb_usascii_encindex(); @@ -1266,7 +1266,7 @@ do { ID id = r_symbol(arg); VALUE val = r_object(arg); - int idx = id2encidx(id, val, arg); + int idx = id2encidx(id, val); if (idx >= 0) { rb_enc_associate_index(obj, idx); if (has_encoding) *has_encoding = TRUE; @@ -1494,8 +1494,8 @@ volatile VALUE str = r_bytes(arg); int options = r_byte(arg); int has_encoding = FALSE; + st_index_t idx = r_prepare(arg); - v = r_entry(rb_reg_alloc(), arg); if (ivp) { r_ivar(str, &has_encoding, arg); *ivp = FALSE; @@ -1519,7 +1519,7 @@ } rb_str_set_len(str, dst - ptr); } - v = rb_reg_init_str(v, str, options); + v = r_entry0(rb_reg_new_str(str, options), idx, arg); v = r_leave(v, arg); } break; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/