summaryrefslogtreecommitdiff
path: root/eval_intern.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-05 11:42:34 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-05 11:42:34 (GMT)
commitb6b76e3a85130dc24dbacd60a82033c780581e9b (patch)
treeceb2a9ef6c63493d267159b4f4d8ab95f8b0de4a /eval_intern.h
parent7ac8fe74074a085eb79dfbf501f186fe0af7d1b2 (diff)
* internal.h: move definition of rb_cref_t to method.h.
* eval_intern.h: move definition of rb_scope_visibility_t to method.h. * method.h: change rb_cref_t::scope_visi from VALUE to rb_scope_visibility_t. [Bug #11219] * vm.c (vm_cref_new): accept rb_method_visibility_t directly. * vm_insnhelper.c (rb_vm_rewrite_cref): don't use 0, but METHOD_VISI_UNDEF. * vm_method.c (rb_scope_visibility_set): don't need to use cast. * vm_method.c (rb_scope_module_func_set): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
-rw-r--r--eval_intern.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/eval_intern.h b/eval_intern.h
index df2d857..de22d56 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -228,22 +228,17 @@ CREF_NEXT_SET(rb_cref_t *cref, const rb_cref_t *next_cref)
RB_OBJ_WRITE(cref, &cref->next, next_cref);
}
-typedef struct rb_scope_visi_struct {
- rb_method_visibility_t method_visi : 3;
- unsigned int module_func : 1;
-} rb_scope_visibility_t;
-
static inline const rb_scope_visibility_t *
CREF_SCOPE_VISI(const rb_cref_t *cref)
{
- return (const rb_scope_visibility_t *)&cref->scope_visi;
+ return &cref->scope_visi;
}
static inline void
-CREF_SCOPE_VISI_COPY(const rb_cref_t *dst_cref, rb_cref_t *src_cref)
+CREF_SCOPE_VISI_COPY(rb_cref_t *dst_cref, const rb_cref_t *src_cref)
{
- rb_scope_visibility_t *src = (rb_scope_visibility_t *)&src_cref->scope_visi;
- rb_scope_visibility_t *dst = (rb_scope_visibility_t *)&dst_cref->scope_visi;
+ const rb_scope_visibility_t *src = &src_cref->scope_visi;
+ rb_scope_visibility_t *dst = &dst_cref->scope_visi;
dst->method_visi = src->method_visi;
dst->module_func = src->module_func;