aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-15 21:26:36 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-15 21:26:36 +0000
commite1807e59951d4280895dd3f2c2fc4a774ad3fe6a (patch)
treed29ced7c41794a2b28b8ebae88d88877cc1dbb1a /thread_pthread.c
parent4bfea99d1131482b6f28b5dd8d0a622de9231156 (diff)
downloadruby-e1807e59951d4280895dd3f2c2fc4a774ad3fe6a.tar.gz
* thread_pthread.c (numberof): renamed from ARRAY_SIZE() because
other all files use numberof(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 4187cf00db..bed9452a28 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -64,8 +64,8 @@ static pthread_t timer_thread_id;
# define USE_SLEEPY_TIMER_THREAD 0
#endif
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#ifndef numberof
+#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
#endif
static void
@@ -1327,7 +1327,7 @@ timer_thread_sleep(rb_global_vm_lock_t* gvl)
}
else {
/* wait (infinite) */
- result = poll(pollfds, ARRAY_SIZE(pollfds), -1);
+ result = poll(pollfds, numberof(pollfds), -1);
}
if (result == 0) {