[前][次][番号順一覧][スレッド一覧]

ruby-changes:37198

From: ko1 <ko1@a...>
Date: Fri, 16 Jan 2015 17:22:03 +0900 (JST)
Subject: [ruby-changes:37198] ko1:r49279 (trunk): vm.c, vm_core.h: constify VM_CF_LEP, VM_CF_PREV_EP, VM_CF_BLOCK_PTR

ko1	2015-01-16 17:21:49 +0900 (Fri, 16 Jan 2015)

  New Revision: 49279

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49279

  Log:
    vm.c, vm_core.h: constify VM_CF_LEP, VM_CF_PREV_EP, VM_CF_BLOCK_PTR
    and rb_vm_control_frame_block_ptr.

  Modified files:
    trunk/ChangeLog
    trunk/vm.c
    trunk/vm_core.h
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 49278)
+++ ChangeLog	(revision 49279)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Jan 16 17:20:33 2015  Koichi Sasada  <ko1@a...>
+
+	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 <aaron@t...>
 
 	* ext/psych/lib/psych.rb: bump version
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 49278)
+++ vm_core.h	(revision 49279)
@@ -902,7 +902,7 @@ typedef rb_control_frame_t * https://github.com/ruby/ruby/blob/trunk/vm_core.h#L902
 #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)
Index: vm.c
===================================================================
--- vm.c	(revision 49278)
+++ vm.c	(revision 49279)
@@ -55,26 +55,26 @@ rb_vm_ep_local_ep(VALUE *ep) https://github.com/ruby/ruby/blob/trunk/vm.c#L55
 }
 
 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);
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]