aboutsummaryrefslogtreecommitdiffstats
path: root/ext/thread
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-02 18:20:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-02 18:20:14 +0000
commitcb2b598024d4f336d27ce0e37dd5d3c8249e4ef0 (patch)
treef577ae1b65eaeddddcb304601bad10d1b29f2317 /ext/thread
parent6bb3105d7e44a8bc901e443f9396e84da135199c (diff)
downloadruby-cb2b598024d4f336d27ce0e37dd5d3c8249e4ef0.tar.gz
* ext/thread/thread.c (Init_thread): move outer module condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/thread')
-rw-r--r--ext/thread/thread.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/thread/thread.c b/ext/thread/thread.c
index 45b8eda904..1a517c5b8a 100644
--- a/ext/thread/thread.c
+++ b/ext/thread/thread.c
@@ -517,20 +517,22 @@ Init_thread(void)
rb_const_set(rb_cObject, id, rb_c##name); \
} \
} while (0)
+#define OUTER rb_cThread
#else
#define ALIAS_GLOBCAL_CONST(name) do { /* nothing */ } while (0)
+#define OUTER 0
#endif
VALUE rb_cConditionVariable = rb_struct_define_without_accessor_under(
- UNDER_THREAD ? rb_cThread : 0,
+ OUTER,
"ConditionVariable", rb_cObject, rb_struct_alloc_noinit,
"waiters", NULL);
VALUE rb_cQueue = rb_struct_define_without_accessor_under(
- UNDER_THREAD ? rb_cThread : 0,
+ OUTER,
"Queue", rb_cObject, rb_struct_alloc_noinit,
"que", "waiters", NULL);
VALUE rb_cSizedQueue = rb_struct_define_without_accessor_under(
- UNDER_THREAD ? rb_cThread : 0,
+ OUTER,
"SizedQueue", rb_cQueue, rb_struct_alloc_noinit,
"que", "waiters", "queue_waiters", "size", NULL);