mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 01:23:57 +02:00
constify again.
Same as last commit, make some fields `const`. include/ruby/ruby.h: * Rasic::klass * RArray::heap::aux::shared_root * RRegexp::src internal.h: * rb_classext_struct::origin_, redefined_class * vm_svar::cref_or_me, lastline, backref, others * vm_throw_data::throw_obj * vm_ifunc::data * MEMO::v1, v2, u3::value While modifying this patch, I found write-barrier miss on rb_classext_struct::redefined_class. Also vm_throw_data::throw_state is only `int` so change the type.
This commit is contained in:
parent
9095ff53cf
commit
1feda1c2b0
5 changed files with 23 additions and 23 deletions
2
class.c
2
class.c
|
@ -176,7 +176,7 @@ class_alloc(VALUE flags, VALUE klass)
|
|||
*/
|
||||
RCLASS_SET_ORIGIN((VALUE)obj, (VALUE)obj);
|
||||
RCLASS_SERIAL(obj) = rb_next_class_serial();
|
||||
RCLASS_REFINED_CLASS(obj) = Qnil;
|
||||
RB_OBJ_WRITE(obj, &RCLASS_REFINED_CLASS(obj), Qnil);
|
||||
RCLASS_EXT(obj)->allocator = 0;
|
||||
|
||||
return (VALUE)obj;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue