mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
899d49bd29
commit
4ab762de21
5 changed files with 21 additions and 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.
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
2
load.c
2
load.c
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
2
method.h
2
method.h
|
@ -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 */
|
||||
|
|
20
vm_method.c
20
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue