summaryrefslogtreecommitdiff
path: root/node.h
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-29 18:23:22 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-29 18:23:22 +0000
commit7d10fe689cd08bb38ae4decb77ad3151f458e543 (patch)
treec148acfdbd30e1b6909c15847c93aa035d917c9e /node.h
parent4c1441870edd4279699a672024332ee309a6c87e (diff)
* eval.c (rb_iterate): NODE_CFUNC does not protect its data
(nd_tval), so create new node NODE_IFUNC for iteration C function. * eval.c (rb_yield_0): use NODE_IFUNC. * gc.c (rb_gc_mark): support NODE_IFUNC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.h')
-rw-r--r--node.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/node.h b/node.h
index 1904a0a..19e95cd 100644
--- a/node.h
+++ b/node.h
@@ -21,6 +21,7 @@ enum node_type {
NODE_METHOD,
NODE_FBODY,
NODE_CFUNC,
+ NODE_IFUNC,
NODE_SCOPE,
NODE_BLOCK,
NODE_IF,
@@ -234,6 +235,7 @@ typedef struct RNode {
#define NEW_DEFN(i,a,d,p) rb_node_newnode(NODE_DEFN,p,i,NEW_RFUNC(a,d))
#define NEW_DEFS(r,i,a,d) rb_node_newnode(NODE_DEFS,r,i,NEW_RFUNC(a,d))
#define NEW_CFUNC(f,c) rb_node_newnode(NODE_CFUNC,f,c,0)
+#define NEW_IFUNC(f,c) rb_node_newnode(NODE_IFUNC,f,c,0)
#define NEW_RFUNC(b1,b2) NEW_SCOPE(block_append(b1,b2))
#define NEW_SCOPE(b) rb_node_newnode(NODE_SCOPE,local_tbl(),cur_cref,(b))
#define NEW_BLOCK(a) rb_node_newnode(NODE_BLOCK,a,0,0)