mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
vm_method.c: use RCLASS_SERIAL macro instead of direct access
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6944b38f7f
commit
96225160f6
1 changed files with 2 additions and 2 deletions
|
@ -576,7 +576,7 @@ rb_method_entry_get_without_cache(VALUE klass, ID id,
|
|||
if (ruby_running) {
|
||||
struct cache_entry *ent;
|
||||
ent = GLOBAL_METHOD_CACHE(klass, id);
|
||||
ent->class_serial = RCLASS_EXT(klass)->class_serial;
|
||||
ent->class_serial = RCLASS_SERIAL(klass);
|
||||
ent->method_state = GET_GLOBAL_METHOD_STATE();
|
||||
ent->defined_class = defined_class;
|
||||
ent->mid = id;
|
||||
|
@ -616,7 +616,7 @@ rb_method_entry(VALUE klass, ID id, VALUE *defined_class_ptr)
|
|||
struct cache_entry *ent;
|
||||
ent = GLOBAL_METHOD_CACHE(klass, id);
|
||||
if (ent->method_state == GET_GLOBAL_METHOD_STATE() &&
|
||||
ent->class_serial == RCLASS_EXT(klass)->class_serial &&
|
||||
ent->class_serial == RCLASS_SERIAL(klass) &&
|
||||
ent->mid == id) {
|
||||
if (defined_class_ptr)
|
||||
*defined_class_ptr = ent->defined_class;
|
||||
|
|
Loading…
Add table
Reference in a new issue