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

ruby-changes:38670

From: ko1 <ko1@a...>
Date: Wed, 3 Jun 2015 23:07:47 +0900 (JST)
Subject: [ruby-changes:38670] ko1:r50751 (trunk): * vm_method.c: rename `rb_frame_...' to `rb_scope_...'.

ko1	2015-06-03 23:07:24 +0900 (Wed, 03 Jun 2015)

  New Revision: 50751

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

  Log:
    * vm_method.c: rename `rb_frame_...' to `rb_scope_...'.
    * eval_intern.h: move decl. of rb_scope_visibility_set() to method.h.
    * load.c: catch up this fix.

  Modified files:
    trunk/ChangeLog
    trunk/eval_intern.h
    trunk/load.c
    trunk/method.h
    trunk/vm_method.c
Index: eval_intern.h
===================================================================
--- eval_intern.h	(revision 50750)
+++ eval_intern.h	(revision 50751)
@@ -291,8 +291,6 @@ CREF_OMOD_SHARED_UNSET(rb_cref_t *cref) https://github.com/ruby/ruby/blob/trunk/eval_intern.h#L291
     cref->flags &= ~NODE_FL_CREF_OMOD_SHARED_;
 }
 
-void rb_frame_visibility_set(rb_method_visibility_t);
-
 void rb_thread_cleanup(void);
 void rb_thread_wait_other_threads(void);
 
Index: method.h
===================================================================
--- method.h	(revision 50750)
+++ method.h	(revision 50751)
@@ -141,4 +141,6 @@ rb_method_entry_t *rb_method_entry_creat https://github.com/ruby/ruby/blob/trunk/method.h#L141
 rb_method_entry_t *rb_method_entry_clone(const rb_method_entry_t *me);
 void rb_method_entry_copy(rb_method_entry_t *dst, rb_method_entry_t *src);
 
+void rb_scope_visibility_set(rb_method_visibility_t);
+
 #endif /* METHOD_H */
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 50750)
+++ ChangeLog	(revision 50751)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jun  3 23:03:50 2015  Koichi Sasada  <ko1@a...>
+
+	* vm_method.c: rename `rb_frame_...' to `rb_scope_...'.
+
+	* eval_intern.h: move decl. of rb_scope_visibility_set() to method.h.
+
+	* load.c: catch up this fix.
+
 Wed Jun  3 21:14:20 2015  Tanaka Akira  <akr@f...>
 
 	* ext/rbconfig/sizeof/extconf.rb: Check C99 standard integer types.
Index: load.c
===================================================================
--- load.c	(revision 50750)
+++ load.c	(revision 50751)
@@ -929,7 +929,7 @@ load_failed(VALUE fname) https://github.com/ruby/ruby/blob/trunk/load.c#L929
 static VALUE
 load_ext(VALUE path)
 {
-    rb_frame_visibility_set(METHOD_VISI_PUBLIC);
+    rb_scope_visibility_set(METHOD_VISI_PUBLIC);
     return (VALUE)dln_load(RSTRING_PTR(path));
 }
 
Index: vm_method.c
===================================================================
--- vm_method.c	(revision 50750)
+++ vm_method.c	(revision 50751)
@@ -934,7 +934,7 @@ rb_method_boundp(VALUE klass, ID id, int https://github.com/ruby/ruby/blob/trunk/vm_method.c#L934
 extern ID rb_check_attr_id(ID id);
 
 static int
-rb_frame_visibility_test(rb_method_visibility_t visi)
+rb_scope_visibility_test(rb_method_visibility_t visi)
 {
     rb_thread_t *th = GET_THREAD();
     rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(th, th->cfp);
@@ -948,21 +948,21 @@ rb_frame_visibility_test(rb_method_visib https://github.com/ruby/ruby/blob/trunk/vm_method.c#L948
 }
 
 static int
-rb_frame_module_func_check(void)
+rb_scope_module_func_check(void)
 {
     return CREF_SCOPE_VISI(rb_vm_cref())->module_func;
 }
 
 void
-rb_frame_visibility_set(rb_method_visibility_t visi)
+rb_scope_visibility_set(rb_method_visibility_t visi)
 {
     rb_scope_visibility_t *scope_visi = (rb_scope_visibility_t *)&rb_vm_cref()->scope_visi;
     scope_visi->method_visi = visi;
     scope_visi->module_func = FALSE;
 }
 
-void
-rb_frame_module_func_set(void)
+static void
+rb_scope_module_func_set(void)
 {
     rb_scope_visibility_t *scope_visi = (rb_scope_visibility_t *)&rb_vm_cref()->scope_visi;
     scope_visi->method_visi = METHOD_VISI_PRIVATE;
@@ -980,13 +980,13 @@ rb_attr(VALUE klass, ID id, int read, in https://github.com/ruby/ruby/blob/trunk/vm_method.c#L980
 	visi = METHOD_VISI_PUBLIC;
     }
     else {
-	if (rb_frame_visibility_test(METHOD_VISI_PRIVATE)) {
+	if (rb_scope_visibility_test(METHOD_VISI_PRIVATE)) {
 	    visi = METHOD_VISI_PRIVATE;
-	    if (rb_frame_module_func_check()) {
+	    if (rb_scope_module_func_check()) {
 		rb_warning("attribute accessor as module_function");
 	    }
 	}
-	else if (rb_frame_visibility_test(METHOD_VISI_PROTECTED)) {
+	else if (rb_scope_visibility_test(METHOD_VISI_PROTECTED)) {
 	    visi = METHOD_VISI_PROTECTED;
 	}
 	else {
@@ -1485,7 +1485,7 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/vm_method.c#L1485
 set_visibility(int argc, const VALUE *argv, VALUE module, rb_method_visibility_t visi)
 {
     if (argc == 0) {
-	rb_frame_visibility_set(visi);
+	rb_scope_visibility_set(visi);
     }
     else {
 	set_method_visibility(module, argc, argv, visi);
@@ -1686,7 +1686,7 @@ rb_mod_modfunc(int argc, VALUE *argv, VA https://github.com/ruby/ruby/blob/trunk/vm_method.c#L1686
     }
 
     if (argc == 0) {
-	rb_frame_module_func_set();
+	rb_scope_module_func_set();
 	return module;
     }
 

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

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