1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 19:19:53 +00:00

MSVC unwilling to concatenate strings across preprocessor directives.

This commit is contained in:
Calvin Rose 2022-02-09 22:36:07 -06:00
parent e64da8ede4
commit aba87bf1bd

View File

@ -1340,16 +1340,15 @@ static JanetSignal janet_check_can_resume(JanetFiber *fiber, Janet *out, int is_
}
/* If a "task" fiber is trying to be used as a normal fiber, detect that. See bug #920. */
if (janet_vm.stackn > 0 && (fiber->gc.flags & JANET_FIBER_FLAG_ROOT)) {
#ifdef JANET_EV
*out = janet_cstringv(is_cancel
? "cannot cancel root fiber, use ev/cancel"
: "cannot resume root fiber, use ev/go");
#else
*out = janet_cstringv(is_cancel
? "cannot cancel root fiber"
#ifdef JANET_EV
", use ev/cancel"
: "cannot resume root fiber");
#endif
: "cannot resume root fiber"
#ifdef JANET_EV
", use ev/go"
#endif
);
return JANET_SIGNAL_ERROR;
}
if (janet_vm.stackn == 0) {