summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-04 12:04:52 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-04 12:04:52 +0000
commit22dfcf9adbdcd5f0c5ce72f1f7c304f5dd8df7c5 (patch)
tree148bc14c2ad760f6f7eda331b1ac441d098db762 /gc.c
parent733fdc06ba61c37a884d8d264c33f2ecf053462b (diff)
* eval.c, gc.c, intern.h, variable.c: declare rb_gc_mark{,maybe}()
canonically in order not to confuse C++ compilers. (backported from 1.7, problem noted by ttate) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gc.c b/gc.c
index 769c67858c..af9930d659 100644
--- a/gc.c
+++ b/gc.c
@@ -476,7 +476,7 @@ rb_mark_hash(tbl)
void
rb_gc_mark_maybe(obj)
- void *obj;
+ VALUE obj;
{
if (is_pointer_to_heap(obj)) {
rb_gc_mark(obj);
@@ -485,7 +485,7 @@ rb_gc_mark_maybe(obj)
void
rb_gc_mark(ptr)
- void *ptr;
+ VALUE ptr;
{
register RVALUE *obj = RANY(ptr);
@@ -517,7 +517,7 @@ rb_gc_mark(ptr)
case NODE_MASGN:
case NODE_RESCUE:
case NODE_RESBODY:
- rb_gc_mark(obj->as.node.u2.node);
+ rb_gc_mark((VALUE)obj->as.node.u2.node);
/* fall through */
case NODE_BLOCK: /* 1,3 */
case NODE_ARRAY:
@@ -531,7 +531,7 @@ rb_gc_mark(ptr)
case NODE_CALL:
case NODE_DEFS:
case NODE_OP_ASGN1:
- rb_gc_mark(obj->as.node.u1.node);
+ rb_gc_mark((VALUE)obj->as.node.u1.node);
/* fall through */
case NODE_SUPER: /* 3 */
case NODE_FCALL:
@@ -554,7 +554,7 @@ rb_gc_mark(ptr)
case NODE_MATCH3:
case NODE_OP_ASGN_OR:
case NODE_OP_ASGN_AND:
- rb_gc_mark(obj->as.node.u1.node);
+ rb_gc_mark((VALUE)obj->as.node.u1.node);
/* fall through */
case NODE_METHOD: /* 2 */
case NODE_NOT:
@@ -590,7 +590,7 @@ rb_gc_mark(ptr)
case NODE_SCOPE: /* 2,3 */
case NODE_CLASS:
case NODE_BLOCK_PASS:
- rb_gc_mark(obj->as.node.u3.node);
+ rb_gc_mark((VALUE)obj->as.node.u3.node);
obj = RANY(obj->as.node.u2.node);
goto Top;
@@ -628,10 +628,10 @@ rb_gc_mark(ptr)
default:
if (is_pointer_to_heap(obj->as.node.u1.node)) {
- rb_gc_mark(obj->as.node.u1.node);
+ rb_gc_mark((VALUE)obj->as.node.u1.node);
}
if (is_pointer_to_heap(obj->as.node.u2.node)) {
- rb_gc_mark(obj->as.node.u2.node);
+ rb_gc_mark((VALUE)obj->as.node.u2.node);
}
if (is_pointer_to_heap(obj->as.node.u3.node)) {
obj = RANY(obj->as.node.u3.node);
@@ -745,7 +745,7 @@ gc_sweep()
p = heaps[i]; pend = p + heaps_limits[i];
while (p < pend) {
if (!(p->as.basic.flags&FL_MARK) && BUILTIN_TYPE(p) == T_NODE)
- rb_gc_mark(p);
+ rb_gc_mark((VALUE)p);
p++;
}
}
@@ -1041,8 +1041,8 @@ rb_gc()
}
}
rb_gc_mark(ruby_class);
- rb_gc_mark(ruby_scope);
- rb_gc_mark(ruby_dyna_vars);
+ rb_gc_mark((VALUE)ruby_scope);
+ rb_gc_mark((VALUE)ruby_dyna_vars);
if (finalizer_table) {
rb_mark_tbl(finalizer_table);
}