summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--thread_pthread.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 32dfc86b70..14c41aad7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Mar 15 14:17:55 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread_pthread.c (numberof): renamed from ARRAY_SIZE() because
+ other all files use numberof().
+
Say Mar 15 01:33:00 2013 Charles Oliver Nutter <headius@headius.com>
* test/ruby/test_lazy_enumerator.rb (TestLazyEnumerator#test_drop_while):
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) {