1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
kosaki 2013-03-15 21:26:36 +00:00
parent 4bfea99d11
commit e1807e5995
2 changed files with 8 additions and 3 deletions

View file

@ -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):

View file

@ -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) {