From cf336082039ae84b5001908f6bb7e04bdda8893e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Fri, 20 Sep 2019 14:12:51 +0900 Subject: 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. --- vm_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm_core.h') diff --git a/vm_core.h b/vm_core.h index 8eb155585e..192165b497 100644 --- a/vm_core.h +++ b/vm_core.h @@ -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); -- cgit v1.2.3