mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
2324c14d00
commit
8dced4d2c0
16 changed files with 181 additions and 100 deletions
8
node.c
8
node.c
|
@ -947,7 +947,7 @@ rb_gc_mark_node(NODE *obj)
|
|||
{
|
||||
switch (nd_type(obj)) {
|
||||
case NODE_IF: /* 1,2,3 */
|
||||
rb_gc_mark(CREF_REFINEMENTS(obj)); /* use as SVAR */
|
||||
rb_gc_mark(CREF_REFINEMENTS((rb_cref_t *)obj)); /* use as SVAR */
|
||||
case NODE_FOR:
|
||||
case NODE_ITER:
|
||||
case NODE_WHEN:
|
||||
|
@ -1070,9 +1070,9 @@ rb_gc_mark_node(NODE *obj)
|
|||
break;
|
||||
|
||||
case NODE_CREF:
|
||||
rb_gc_mark(CREF_REFINEMENTS(obj));
|
||||
rb_gc_mark(CREF_CLASS(obj));
|
||||
return (VALUE)CREF_NEXT(obj);;
|
||||
rb_gc_mark(CREF_REFINEMENTS((rb_cref_t *)obj));
|
||||
rb_gc_mark(CREF_CLASS((rb_cref_t *)obj));
|
||||
return (VALUE)CREF_NEXT((rb_cref_t *)obj);
|
||||
|
||||
default: /* unlisted NODE */
|
||||
rb_gc_mark_maybe(RNODE(obj)->u1.value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue