summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-17 03:08:20 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-17 03:08:20 (GMT)
commitfd639a4c3bb7f5a9f0f33c2230ab58fd4bd3d70b (patch)
treebe43f82eb5106ed6d212a0736c7d7cc5c4fd2c97 /vm.c
parent25d670429c8ecf3e2d2cf4310982a331e8dc2133 (diff)
vm.c: constify
* vm.c (rb_vm_get_binding_creatable_next_cfp): constify arguments. (rb_vm_get_ruby_level_next_cfp): ditto. (vm_get_ruby_level_caller_cfp): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/vm.c b/vm.c
index 8551b0d..750c756 100644
--- a/vm.c
+++ b/vm.c
@@ -231,7 +231,7 @@ vm_set_main_stack(rb_thread_t *th, VALUE iseqval)
}
rb_control_frame_t *
-rb_vm_get_binding_creatable_next_cfp(rb_thread_t *th, const rb_control_frame_t *cfp)
+rb_vm_get_binding_creatable_next_cfp(const rb_thread_t *th, const rb_control_frame_t *cfp)
{
while (!RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(th, cfp)) {
if (cfp->iseq) {
@@ -243,7 +243,7 @@ rb_vm_get_binding_creatable_next_cfp(rb_thread_t *th, const rb_control_frame_t *
}
rb_control_frame_t *
-rb_vm_get_ruby_level_next_cfp(rb_thread_t *th, const rb_control_frame_t *cfp)
+rb_vm_get_ruby_level_next_cfp(const rb_thread_t *th, const rb_control_frame_t *cfp)
{
while (!RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(th, cfp)) {
if (RUBY_VM_NORMAL_ISEQ_P(cfp->iseq)) {
@@ -255,17 +255,17 @@ rb_vm_get_ruby_level_next_cfp(rb_thread_t *th, const rb_control_frame_t *cfp)
}
static rb_control_frame_t *
-vm_get_ruby_level_caller_cfp(rb_thread_t *th, rb_control_frame_t *cfp)
+vm_get_ruby_level_caller_cfp(const rb_thread_t *th, const rb_control_frame_t *cfp)
{
if (RUBY_VM_NORMAL_ISEQ_P(cfp->iseq)) {
- return cfp;
+ return (rb_control_frame_t *)cfp;
}
cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
while (!RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(th, cfp)) {
if (RUBY_VM_NORMAL_ISEQ_P(cfp->iseq)) {
- return cfp;
+ return (rb_control_frame_t *)cfp;
}
if ((cfp->flag & VM_FRAME_FLAG_PASSED) == 0) {