summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-08 21:22:43 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-08 21:22:43 +0000
commit8dced4d2c0f284bd17a3cb4a4fbed6d459cc71e0 (patch)
tree3d7836fd4b98251ca69231fd5a0f8088563e7022 /vm_method.c
parent2324c14d00c301467ac9a3a5fc95d812109e116f (diff)
* internal.h: define rb_cref_t and change to use it.
rb_cref_t is data type of CREF. Now, the body is still NODE. It is easy to understand what is CREF and what is pure NODE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/vm_method.c b/vm_method.c
index 48c518f..c7caccb 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -447,7 +447,7 @@ setup_method_cfunc_struct(rb_method_cfunc_t *cfunc, VALUE (*func)(), int argc)
}
rb_method_entry_t *
-rb_add_method0(VALUE klass, ID mid, rb_method_type_t type, void *opts, rb_method_flag_t noex, NODE *cref)
+rb_add_method0(VALUE klass, ID mid, rb_method_type_t type, void *opts, rb_method_flag_t noex, rb_cref_t *cref)
{
rb_thread_t *th;
rb_control_frame_t *cfp;
@@ -471,7 +471,7 @@ rb_add_method0(VALUE klass, ID mid, rb_method_type_t type, void *opts, rb_method
switch (type) {
case VM_METHOD_TYPE_ISEQ: {
rb_iseq_t *iseq = (rb_iseq_t *)opts;
- NODE *private_cref;
+ rb_cref_t *private_cref;
*(rb_iseq_t **)&def->body.iseq_body.iseq = iseq;
RB_OBJ_WRITTEN(klass, Qundef, iseq->self); /* should be set iseq before newobj */
@@ -531,7 +531,7 @@ rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *opts, rb_method_
}
void
-rb_add_method_iseq(VALUE klass, ID mid, rb_iseq_t *iseq, NODE *cref, rb_method_flag_t noex)
+rb_add_method_iseq(VALUE klass, ID mid, rb_iseq_t *iseq, rb_cref_t *cref, rb_method_flag_t noex)
{
rb_add_method0(klass, mid, VM_METHOD_TYPE_ISEQ, iseq, noex, cref);
}
@@ -743,7 +743,7 @@ rb_method_entry_with_refinements(VALUE klass, ID id,
rb_method_entry_t *me = rb_method_entry(klass, id, &defined_class);
if (me && me->def->type == VM_METHOD_TYPE_REFINED) {
- NODE *cref = rb_vm_cref();
+ const rb_cref_t *cref = rb_vm_cref();
VALUE refinements = cref ? CREF_REFINEMENTS(cref) : Qnil;
me = rb_resolve_refined_method(refinements, me, &defined_class);