summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-03 14:07:24 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-03 14:07:24 (GMT)
commit4ab762de21ecf321cf88b8f17750f6f4ea9ebf3f (patch)
treecca1e4aa6a2561e16ca33fd645f81457a98bc303 /vm_method.c
parent899d49bd2980c1fae55818cf983449c71a800949 (diff)
* 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
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/vm_method.c b/vm_method.c
index fcc033b..20e4794 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;
}