summaryrefslogtreecommitdiff
path: root/gc.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-08 16:15:20 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-08 16:15:20 (GMT)
commit89cc2aef81289d41de7971e84ade189140ea8672 (patch)
tree96f0c0e92bb194642648bda6e4534bb549b0d707 /gc.h
parentffde073b0c2875ccfc23d09d74c351000bbcb969 (diff)
* cont.c (stackgrowdirection): removed duplicated code, use
STACK_UPPER macro instead. * gc.h (STACK_DIR_UPPER): moved from thread_pthread.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.h')
-rw-r--r--gc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gc.h b/gc.h
index 1b112f8..439f8d3 100644
--- a/gc.h
+++ b/gc.h
@@ -74,4 +74,12 @@ int ruby_get_stack_grow_direction(volatile VALUE *addr);
# define STACK_UPPER(x, a, b) (stack_growup_p(x) ? a : b)
#endif
+#if STACK_GROW_DIRECTION
+#define STACK_GROW_DIR_DETECTION
+#define STACK_DIR_UPPER(a,b) STACK_UPPER(0, a, b)
+#else
+#define STACK_GROW_DIR_DETECTION VALUE stack_grow_dir_detection
+#define STACK_DIR_UPPER(a,b) STACK_UPPER(&stack_grow_dir_detection, a, b)
+#endif
+
#endif /* RUBY_GC_H */