diff options
author | 卜部昌平 <[email protected]> | 2019-09-20 14:12:51 +0900 |
---|---|---|
committer | 卜部昌平 <[email protected]> | 2019-09-30 10:26:38 +0900 |
commit | cf336082039ae84b5001908f6bb7e04bdda8893e (patch) | |
tree | 4a89c410a24a8bfd946deee2c1358734c6fd3357 /vm_core.h | |
parent | 3632a812c0b1e0bd1c75b2426cbfe9ec1715bb56 (diff) |
refactor constify most of rb_method_definition_t
Most (if not all) of the fields of rb_method_definition_t are never
meant to be modified once after they are stored. Marking them const
makes it possible for compilers to warn on unintended modifications.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2486
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -491,7 +491,7 @@ rb_iseq_check(const rb_iseq_t *iseq) } static inline const rb_iseq_t * -def_iseq_ptr(rb_method_definition_t *def) +def_iseq_ptr(const rb_method_definition_t *def) { #if VM_CHECK_MODE > 0 if (def->type != VM_METHOD_TYPE_ISEQ) rb_bug("def_iseq_ptr: not iseq (%d)", def->type); |