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

ruby-changes:48671

From: ko1 <ko1@a...>
Date: Thu, 16 Nov 2017 14:14:23 +0900 (JST)
Subject: [ruby-changes:48671] ko1:r60787 (trunk): add `ec` as first parameter.

ko1	2017-11-16 14:14:18 +0900 (Thu, 16 Nov 2017)

  New Revision: 60787

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

  Log:
    add `ec` as first parameter.
    
    * vm.c (vm_svar_get): accepts `ec` as first parameter.
    
    * vm.c (vm_svar_set): ditto.

  Modified files:
    trunk/vm.c
Index: vm.c
===================================================================
--- vm.c	(revision 60786)
+++ vm.c	(revision 60787)
@@ -1214,41 +1214,39 @@ vm_cfp_svar_set(const rb_execution_conte https://github.com/ruby/ruby/blob/trunk/vm.c#L1214
 }
 
 static VALUE
-vm_svar_get(VALUE key)
+vm_svar_get(const rb_execution_context_t *ec, VALUE key)
 {
-    const rb_execution_context_t *ec = GET_EC();
     return vm_cfp_svar_get(ec, ec->cfp, key);
 }
 
 static void
-vm_svar_set(VALUE key, VALUE val)
+vm_svar_set(const rb_execution_context_t *ec, VALUE key, VALUE val)
 {
-    const rb_execution_context_t *ec = GET_EC();
     vm_cfp_svar_set(ec, ec->cfp, key, val);
 }
 
 VALUE
 rb_backref_get(void)
 {
-    return vm_svar_get(VM_SVAR_BACKREF);
+    return vm_svar_get(GET_EC(), VM_SVAR_BACKREF);
 }
 
 void
 rb_backref_set(VALUE val)
 {
-    vm_svar_set(VM_SVAR_BACKREF, val);
+    vm_svar_set(GET_EC(), VM_SVAR_BACKREF, val);
 }
 
 VALUE
 rb_lastline_get(void)
 {
-    return vm_svar_get(VM_SVAR_LASTLINE);
+    return vm_svar_get(GET_EC(), VM_SVAR_LASTLINE);
 }
 
 void
 rb_lastline_set(VALUE val)
 {
-    vm_svar_set(VM_SVAR_LASTLINE, val);
+    vm_svar_set(GET_EC(), VM_SVAR_LASTLINE, val);
 }
 
 /* misc */

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

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