From 948bd807c3c564317e1c2e8d66ecaf85c49dead7 Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 21 Jul 2015 21:28:43 +0000 Subject: * vm_core.h: constify rb_call_info_t::blockiseq and rb_iseq_t::iseq. * vm.c, vm_insnhelper.c: catch up this fix. * iseq.c (iseq_data_to_ary): constify the first iseq parameter. * vm_insnhelper.c (vm_make_proc_with_iseq): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- iseq.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'iseq.c') diff --git a/iseq.c b/iseq.c index 1af491e997..694b3dfe05 100644 --- a/iseq.c +++ b/iseq.c @@ -934,8 +934,7 @@ rb_iseq_method_name(VALUE self) } } -static -VALUE iseq_data_to_ary(rb_iseq_t *iseq); +static VALUE iseq_data_to_ary(const rb_iseq_t *iseq); /* * call-seq: @@ -1611,7 +1610,7 @@ cdhash_each(VALUE key, VALUE value, VALUE ary) } static VALUE -iseq_data_to_ary(rb_iseq_t *iseq) +iseq_data_to_ary(const rb_iseq_t *iseq) { long i; size_t ti; @@ -1731,7 +1730,7 @@ iseq_data_to_ary(rb_iseq_t *iseq) } /* body */ - iseq_original = rb_iseq_original_iseq(iseq); + iseq_original = rb_iseq_original_iseq((rb_iseq_t *)iseq); for (seq = iseq_original; seq < iseq_original + iseq->iseq_size; ) { VALUE insn = *seq++; @@ -1756,7 +1755,7 @@ iseq_data_to_ary(rb_iseq_t *iseq) break; case TS_ISEQ: { - rb_iseq_t *iseq = (rb_iseq_t *)*seq; + const rb_iseq_t *iseq = (rb_iseq_t *)*seq; if (iseq) { VALUE val = iseq_data_to_ary(iseq); rb_ary_push(ary, val); -- cgit v1.2.3