summaryrefslogtreecommitdiffstats
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
commit1055378ed459ec4021ee68994f6c6ed73043a392 (patch)
treea3040d7106cdbda76ed449d52c1a2252df1a80f6
parentfbdbb3c62326cb16d5c0f4b6d872acb058d9408b (diff)
downloadruby-1055378ed459ec4021ee68994f6c6ed73043a392.tar.gz
ruby-1055378ed459ec4021ee68994f6c6ed73043a392.tar.xz
ruby-1055378ed459ec4021ee68994f6c6ed73043a392.zip
* thread.c (rb_thread_blocking_region): standard C doesn't accept
preprosessing directive within macro expansion. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--thread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/thread.c b/thread.c
index ce2c3829b..4771c5d0d 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;