mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* include/ruby/intern.h: export rb_ivar_foreach.
* include/ruby/ruby.h: modify struct RObject and RClass for optimizing T_OBJECT space. [ruby-dev:31853] (ROBJECT_LEN, ROBJECT_PTR) (RCLASS_IV_TBL, RCLASS_M_TBL, RCLASS_SUPER, RCLASS_IV_INDEX_TBL) (RMODULE_IV_TBL, RMODULE_M_TBL, RMODULE_SUPER): abstract accessor defined. * variable.c: support the modified RObject and RClass. * object.c: ditto. * class.c: ditto. * gc.c: ditto. * marshal.c: ditto. * eval_method.ci: use the abstract accessor. * insns.def: ditto. * proc.c: ditto. * struct.c: ditto. * eval.c: ditto. * error.c: ditto. * vm.c: ditto. * insnhelper.ci: ditto. * ext/digest/digest.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
041fbcbf50
commit
5c0e68c39c
17 changed files with 448 additions and 193 deletions
2
struct.c
2
struct.c
|
@ -25,7 +25,7 @@ rb_struct_iv_get(VALUE c, const char *name)
|
|||
for (;;) {
|
||||
if (rb_ivar_defined(c, id))
|
||||
return rb_ivar_get(c, id);
|
||||
c = RCLASS(c)->super;
|
||||
c = RCLASS_SUPER(c);
|
||||
if (c == 0 || c == rb_cStruct)
|
||||
return Qnil;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue