From c7124d811fbfcbc02a7d1e5cf0d79cb62de73016 Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 16 Jan 2015 08:21:49 +0000 Subject: vm.c, vm_core.h: constify VM_CF_LEP, VM_CF_PREV_EP, VM_CF_BLOCK_PTR and rb_vm_control_frame_block_ptr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ vm.c | 8 ++++---- vm_core.h | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8acead194e..3dc56f74d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jan 16 17:20:33 2015 Koichi Sasada + + vm.c, vm_core.h: constify VM_CF_LEP, VM_CF_PREV_EP, VM_CF_BLOCK_PTR + and rb_vm_control_frame_block_ptr. + Fri Jan 16 15:41:21 2015 Aaron Patterson * ext/psych/lib/psych.rb: bump version diff --git a/vm.c b/vm.c index 80b3bbe5aa..3aaf1ea483 100644 --- a/vm.c +++ b/vm.c @@ -55,26 +55,26 @@ rb_vm_ep_local_ep(VALUE *ep) } static inline VALUE * -VM_CF_LEP(rb_control_frame_t *cfp) +VM_CF_LEP(const rb_control_frame_t * const cfp) { return VM_EP_LEP(cfp->ep); } static inline VALUE * -VM_CF_PREV_EP(rb_control_frame_t * cfp) +VM_CF_PREV_EP(const rb_control_frame_t * const cfp) { return VM_EP_PREV_EP(cfp->ep); } static inline rb_block_t * -VM_CF_BLOCK_PTR(rb_control_frame_t *cfp) +VM_CF_BLOCK_PTR(const rb_control_frame_t * const cfp) { VALUE *ep = VM_CF_LEP(cfp); return VM_EP_BLOCK_PTR(ep); } rb_block_t * -rb_vm_control_frame_block_ptr(rb_control_frame_t *cfp) +rb_vm_control_frame_block_ptr(const rb_control_frame_t *cfp) { return VM_CF_BLOCK_PTR(cfp); } diff --git a/vm_core.h b/vm_core.h index 809da4e86f..b014383339 100644 --- a/vm_core.h +++ b/vm_core.h @@ -902,7 +902,7 @@ typedef rb_control_frame_t * #define VM_EP_LEP_P(ep) VM_ENVVAL_BLOCK_PTR_P((ep)[0]) VALUE *rb_vm_ep_local_ep(VALUE *ep); -rb_block_t *rb_vm_control_frame_block_ptr(rb_control_frame_t *cfp); +rb_block_t *rb_vm_control_frame_block_ptr(const rb_control_frame_t *cfp); #define RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp) ((cfp)+1) #define RUBY_VM_NEXT_CONTROL_FRAME(cfp) ((cfp)-1) -- cgit v1.2.3