aboutsummaryrefslogtreecommitdiffstats
path: root/iseq.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-23 09:34:31 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-23 09:34:31 +0000
commit18f6978625fe8adc4fe6e414e73e97d52b566592 (patch)
treef3941e0d248e616a71d486a657de136e80df2a09 /iseq.c
parentf965866f4f0a00c8179a1097e89fb4e61f71a92a (diff)
downloadruby-18f6978625fe8adc4fe6e414e73e97d52b566592.tar.gz
* vm_core.h: constify rb_iseq_constant_body::iseq_encoded and
rb_control_frame_t::pc. * compile.c (rb_iseq_translate_threaded_code): catch up this fix. * iseq.c: ditto. * vm_exec.c (vm_exec_core): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/iseq.c b/iseq.c
index 489be5f2eb..4a59286ef3 100644
--- a/iseq.c
+++ b/iseq.c
@@ -72,10 +72,10 @@ rb_iseq_free(const rb_iseq_t *iseq)
if (iseq) {
int i;
- ruby_xfree(iseq->body->iseq_encoded);
- ruby_xfree(iseq->body->line_info_table);
- ruby_xfree(iseq->body->local_table);
- ruby_xfree(iseq->body->is_entries);
+ ruby_xfree((void *)iseq->body->iseq_encoded);
+ ruby_xfree((void *)iseq->body->line_info_table);
+ ruby_xfree((void *)iseq->body->local_table);
+ ruby_xfree((void *)iseq->body->is_entries);
if (iseq->body->callinfo_entries) {
for (i=0; i<iseq->body->callinfo_size; i++) {
@@ -85,11 +85,12 @@ rb_iseq_free(const rb_iseq_t *iseq)
}
ruby_xfree(iseq->body->callinfo_entries);
}
- ruby_xfree(iseq->body->catch_table);
- ruby_xfree(iseq->body->param.opt_table);
+ ruby_xfree((void *)iseq->body->catch_table);
+ ruby_xfree((void *)iseq->body->param.opt_table);
+
if (iseq->body->param.keyword != NULL) {
- ruby_xfree(iseq->body->param.keyword->default_values);
- ruby_xfree(iseq->body->param.keyword);
+ ruby_xfree((void *)iseq->body->param.keyword->default_values);
+ ruby_xfree((void *)iseq->body->param.keyword);
}
compile_data_free(iseq->compile_data);
ruby_xfree(iseq->variable_body->iseq);
@@ -2118,7 +2119,8 @@ rb_iseqw_line_trace_each(VALUE iseqw, int (*func)(int line, rb_event_flag_t *eve
/* printf("line: %d\n", line); */
cont = (*func)(line, &events, data);
if (current_events != events) {
- iseq_original[pos+1] = iseq->body->iseq_encoded[pos+1] =
+ VALUE *encoded = (VALUE *)iseq->body->iseq_encoded;
+ iseq_original[pos+1] = encoded[pos+1] =
(VALUE)(current_events | (events & RUBY_EVENT_SPECIFIED_LINE));
}
}