mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Init functions don't need ID caches
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
255adda52f
commit
876bfc6b4e
9 changed files with 38 additions and 14 deletions
12
struct.c
12
struct.c
|
@ -1064,7 +1064,7 @@ rb_struct_size(VALUE s)
|
|||
* Symbol (<code>:name</code>).
|
||||
*/
|
||||
void
|
||||
Init_Struct(void)
|
||||
InitVM_Struct(void)
|
||||
{
|
||||
rb_cStruct = rb_define_class("Struct", rb_cObject);
|
||||
rb_include_module(rb_cStruct, rb_mEnumerable);
|
||||
|
@ -1095,5 +1095,13 @@ Init_Struct(void)
|
|||
rb_define_method(rb_cStruct, "values_at", rb_struct_values_at, -1);
|
||||
|
||||
rb_define_method(rb_cStruct, "members", rb_struct_members_m, 0);
|
||||
id_members = rb_intern("__members__");
|
||||
}
|
||||
|
||||
#undef rb_intern
|
||||
void
|
||||
Init_Struct(void)
|
||||
{
|
||||
id_members = rb_intern("__members__");
|
||||
|
||||
InitVM(Struct);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue