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

* 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
This commit is contained in:
usa 2009-10-30 04:01:46 +00:00
parent 411b747091
commit de6d21a381

View file

@ -1097,15 +1097,17 @@ rb_thread_blocking_region(
data2 = th; data2 = th;
} }
BLOCKING_REGION({
#if PROHIBIT_FUNCTION_CAST #if PROHIBIT_FUNCTION_CAST
BLOCKING_REGION({
args.func = func; args.func = func;
args.data = data1; args.data = data1;
val = rb_protect(call_blocking_function, (VALUE)&args, &status); val = rb_protect(call_blocking_function, (VALUE)&args, &status);
#else
val = rb_protect((VALUE (*)(VALUE))func, (VALUE)data1, &status);
#endif
}, ubf, data2); }, ubf, data2);
#else
BLOCKING_REGION({
val = rb_protect((VALUE (*)(VALUE))func, (VALUE)data1, &status);
}, ubf, data2);
#endif
if (status) rb_jump_tag(status); if (status) rb_jump_tag(status);
return val; return val;