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

ruby-changes:43697

From: ko1 <ko1@a...>
Date: Fri, 29 Jul 2016 04:27:57 +0900 (JST)
Subject: [ruby-changes:43697] ko1:r55770 (trunk): * vm_core.h (VM_ENV_LOCAL_P): return truthy (0 or not) value.

ko1	2016-07-29 04:27:52 +0900 (Fri, 29 Jul 2016)

  New Revision: 55770

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

  Log:
    * vm_core.h (VM_ENV_LOCAL_P): return truthy (0 or not) value.
    
    * vm.c (rb_vm_make_proc_lambda): use VM_ENV_ESCAPED_P() macro.

  Modified files:
    trunk/ChangeLog
    trunk/vm.c
    trunk/vm_core.h
Index: vm.c
===================================================================
--- vm.c	(revision 55769)
+++ vm.c	(revision 55770)
@@ -865,7 +865,7 @@ rb_vm_make_proc_lambda(rb_thread_t *th, https://github.com/ruby/ruby/blob/trunk/vm.c#L865
 {
     VALUE procval;
 
-    if (!VM_ENV_FLAGS(captured->ep, VM_ENV_FLAG_ESCAPED)) {
+    if (!VM_ENV_ESCAPED_P(captured->ep)) {
 	rb_control_frame_t *cfp = VM_CAPTURED_BLOCK_TO_CFP(captured);
 	vm_make_env_object(th, cfp);
     }
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 55769)
+++ ChangeLog	(revision 55770)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Jul 29 04:23:08 2016  Koichi Sasada  <ko1@a...>
+
+	* vm_core.h (VM_ENV_LOCAL_P): return truthy (0 or not) value.
+
+	* vm.c (rb_vm_make_proc_lambda): use VM_ENV_ESCAPED_P() macro.
+
 Fri Jul 29 03:49:04 2016  Koichi Sasada  <ko1@a...>
 
 	* vm.c, internal.h: remove RubyVM::Env class and all of env objects
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 55769)
+++ vm_core.h	(revision 55770)
@@ -1039,7 +1039,7 @@ VM_FRAME_TYPE(const rb_control_frame_t * https://github.com/ruby/ruby/blob/trunk/vm_core.h#L1039
 static inline int
 VM_ENV_LOCAL_P(const VALUE *ep)
 {
-    return VM_ENV_FLAGS(ep, VM_ENV_FLAG_LOCAL) ? 1 : 0;
+    return VM_ENV_FLAGS(ep, VM_ENV_FLAG_LOCAL);
 }
 
 static inline const VALUE *

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

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