зеркало из https://github.com/github/ruby.git
* thread.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
6fd9c37124
Коммит
c36ad781ef
|
@ -1,3 +1,7 @@
|
|||
Sat Jan 8 19:28:55 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* thread.c: parenthesize macro arguments.
|
||||
|
||||
Fri Jan 7 23:07:40 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (configuration): backref needs to capture.
|
||||
|
|
18
thread.c
18
thread.c
|
@ -131,7 +131,7 @@ static inline void blocking_region_end(rb_thread_t *th, struct rb_blocking_regio
|
|||
#define BLOCKING_REGION(exec, ubf, ubfarg) do { \
|
||||
rb_thread_t *__th = GET_THREAD(); \
|
||||
struct rb_blocking_region_buffer __region; \
|
||||
blocking_region_begin(__th, &__region, ubf, ubfarg); \
|
||||
blocking_region_begin(__th, &__region, (ubf), (ubfarg)); \
|
||||
exec; \
|
||||
blocking_region_end(__th, &__region); \
|
||||
RUBY_VM_CHECK_INTS(); \
|
||||
|
@ -2368,9 +2368,9 @@ rb_fd_select(int n, rb_fdset_t *readfds, rb_fdset_t *writefds, rb_fdset_t *excep
|
|||
#undef FD_ISSET
|
||||
|
||||
#define FD_ZERO(f) rb_fd_zero(f)
|
||||
#define FD_SET(i, f) rb_fd_set(i, f)
|
||||
#define FD_CLR(i, f) rb_fd_clr(i, f)
|
||||
#define FD_ISSET(i, f) rb_fd_isset(i, f)
|
||||
#define FD_SET(i, f) rb_fd_set((i), (f))
|
||||
#define FD_CLR(i, f) rb_fd_clr((i), (f))
|
||||
#define FD_ISSET(i, f) rb_fd_isset((i), (f))
|
||||
|
||||
#elif defined(_WIN32)
|
||||
|
||||
|
@ -2414,9 +2414,9 @@ rb_fd_set(int fd, rb_fdset_t *set)
|
|||
#undef FD_ISSET
|
||||
|
||||
#define FD_ZERO(f) rb_fd_zero(f)
|
||||
#define FD_SET(i, f) rb_fd_set(i, f)
|
||||
#define FD_CLR(i, f) rb_fd_clr(i, f)
|
||||
#define FD_ISSET(i, f) rb_fd_isset(i, f)
|
||||
#define FD_SET(i, f) rb_fd_set((i), (f))
|
||||
#define FD_CLR(i, f) rb_fd_clr((i), (f))
|
||||
#define FD_ISSET(i, f) rb_fd_isset((i), (f))
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -3045,7 +3045,7 @@ thgroup_add(VALUE group, VALUE thread)
|
|||
*/
|
||||
|
||||
#define GetMutexPtr(obj, tobj) \
|
||||
TypedData_Get_Struct(obj, mutex_t, &mutex_data_type, tobj)
|
||||
TypedData_Get_Struct((obj), mutex_t, &mutex_data_type, (tobj))
|
||||
|
||||
static const char *mutex_unlock(mutex_t *mutex, rb_thread_t volatile *th);
|
||||
|
||||
|
@ -3455,7 +3455,7 @@ barrier_alloc(VALUE klass)
|
|||
return TypedData_Wrap_Struct(klass, &barrier_data_type, (void *)mutex_alloc(0));
|
||||
}
|
||||
|
||||
#define GetBarrierPtr(obj) (VALUE)rb_check_typeddata(obj, &barrier_data_type)
|
||||
#define GetBarrierPtr(obj) ((VALUE)rb_check_typeddata((obj), &barrier_data_type))
|
||||
|
||||
VALUE
|
||||
rb_barrier_new(void)
|
||||
|
|
Загрузка…
Ссылка в новой задаче