aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2019-07-22 17:44:58 +0900
committerKoichi Sasada <ko1@atdot.net>2019-07-22 17:53:10 +0900
commit1feda1c2b091b950efcaa481a11fd660efa9e717 (patch)
tree385ccde7762ce9c2b1e3faebd4a386d0a6e300bb /include
parent9095ff53cf6c25154c7f80910aab8d1af45c42ec (diff)
downloadruby-1feda1c2b091b950efcaa481a11fd660efa9e717.tar.gz
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.
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index af561ff638..5456dbc941 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -887,7 +887,7 @@ enum ruby_fl_type {
struct RUBY_ALIGNAS(SIZEOF_VALUE) RBasic {
VALUE flags;
- VALUE klass;
+ const VALUE klass;
};
VALUE rb_obj_hide(VALUE obj);
@@ -1054,7 +1054,7 @@ struct RArray {
long len;
union {
long capa;
- VALUE shared_root;
+ const VALUE shared_root;
} aux;
const VALUE *ptr;
} heap;
@@ -1109,7 +1109,7 @@ struct RArray {
struct RRegexp {
struct RBasic basic;
struct re_pattern_buffer *ptr;
- VALUE src;
+ const VALUE src;
unsigned long usecnt;
};
#define RREGEXP_PTR(r) (RREGEXP(r)->ptr)