struct.c: use iseqval

* struct.c (define_aref_method, define_aset_method): use iseq
  VALUE instead of rb_iseq_t to prevent from GC, as RB_GC_GUARD
  makes sense only for local variables.  [Feature #10575]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-12-10 04:39:29 +00:00
parent bf74f633c5
commit 8efe878d11
3 changed files with 18 additions and 10 deletions

8
iseq.c
View file

@ -548,7 +548,7 @@ iseq_load(VALUE self, VALUE data, VALUE parent, VALUE opt)
return iseqval;
}
rb_iseq_t *
VALUE
rb_method_for_self_aref(VALUE name, VALUE arg)
{
VALUE iseqval = iseq_alloc(rb_cISeq);
@ -591,10 +591,10 @@ rb_method_for_self_aref(VALUE name, VALUE arg)
rb_iseq_build_from_ary(iseq, misc, locals, params, exception, body);
cleanup_iseq_build(iseq);
return iseq;
return iseqval;
}
rb_iseq_t *
VALUE
rb_method_for_self_aset(VALUE name, VALUE arg)
{
VALUE iseqval = iseq_alloc(rb_cISeq);
@ -646,7 +646,7 @@ rb_method_for_self_aset(VALUE name, VALUE arg)
rb_iseq_build_from_ary(iseq, misc, locals, params, exception, body);
cleanup_iseq_build(iseq);
return iseq;
return iseqval;
}
/*