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:
parent
411b747091
commit
de6d21a381
1 changed files with 6 additions and 4 deletions
10
thread.c
10
thread.c
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue