diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-03 14:07:24 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-03 14:07:24 +0000 |
commit | a2561fe3b0d555b4b69414282512577bce5ea0f7 (patch) | |
tree | cca1e4aa6a2561e16ca33fd645f81457a98bc303 | |
parent | c9f685c6013fe490a1cc5910a0f295e73cf52ca0 (diff) | |
download | ruby-a2561fe3b0d555b4b69414282512577bce5ea0f7.tar.gz |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | eval_intern.h | 2 | ||||
-rw-r--r-- | load.c | 2 | ||||
-rw-r--r-- | method.h | 2 | ||||
-rw-r--r-- | vm_method.c | 20 |
5 files changed, 21 insertions, 13 deletions
@@ -1,3 +1,11 @@ +Wed Jun 3 23:03:50 2015 Koichi Sasada <ko1@atdot.net> + + * 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@fsij.org> * ext/rbconfig/sizeof/extconf.rb: Check C99 standard integer types. diff --git a/eval_intern.h b/eval_intern.h index e503d15d9d..df2d857340 100644 --- a/eval_intern.h +++ b/eval_intern.h @@ -291,8 +291,6 @@ CREF_OMOD_SHARED_UNSET(rb_cref_t *cref) 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); @@ -929,7 +929,7 @@ load_failed(VALUE fname) 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)); } @@ -141,4 +141,6 @@ rb_method_entry_t *rb_method_entry_create(ID called_id, VALUE klass, rb_method_d 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 */ diff --git a/vm_method.c b/vm_method.c index fcc033bc3f..20e4794f41 100644 --- a/vm_method.c +++ b/vm_method.c @@ -934,7 +934,7 @@ rb_method_boundp(VALUE klass, ID id, int ex) 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_visibility_t visi) } 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, int write, int ex) 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 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, VALUE module) } if (argc == 0) { - rb_frame_module_func_set(); + rb_scope_module_func_set(); return module; } |