From de6d21a3818a7fac384f1912ee3813d77cba1370 Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 30 Oct 2009 04:01:46 +0000 Subject: [PATCH] * thread.c (rb_thread_blocking_region): standard C doesn't accept preprosessing directive within macro expansion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/thread.c b/thread.c index ce2c3829bd..4771c5d0db 100644 --- a/thread.c +++ b/thread.c @@ -1097,15 +1097,17 @@ rb_thread_blocking_region( data2 = th; } - BLOCKING_REGION({ #if PROHIBIT_FUNCTION_CAST + BLOCKING_REGION({ args.func = func; args.data = data1; val = rb_protect(call_blocking_function, (VALUE)&args, &status); -#else - val = rb_protect((VALUE (*)(VALUE))func, (VALUE)data1, &status); -#endif }, ubf, data2); +#else + BLOCKING_REGION({ + val = rb_protect((VALUE (*)(VALUE))func, (VALUE)data1, &status); + }, ubf, data2); +#endif if (status) rb_jump_tag(status); return val;