summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-30 04:01:46 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-30 04:01:46 +0000
commitde6d21a3818a7fac384f1912ee3813d77cba1370 (patch)
treea3040d7106cdbda76ed449d52c1a2252df1a80f6 /thread.c
parent411b74709163708d46843970e6acdde85de4ae14 (diff)
* 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
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c6
1 files changed, 4 insertions, 2 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);
+ }, ubf, data2);
#else
+ BLOCKING_REGION({
val = rb_protect((VALUE (*)(VALUE))func, (VALUE)data1, &status);
-#endif
}, ubf, data2);
+#endif
if (status) rb_jump_tag(status);
return val;