… | |
… | |
12 | if (!state) |
12 | if (!state) |
13 | croak (\"${Package}::$func_name() -- $var is a hashref but lacks the _coro_state key\"); |
13 | croak (\"${Package}::$func_name() -- $var is a hashref but lacks the _coro_state key\"); |
14 | arg = *state; |
14 | arg = *state; |
15 | } |
15 | } |
16 | |
16 | |
|
|
17 | /* must also be changed inside Coro::Cont::result */ |
17 | if (sv_derived_from (arg, \"Coro::State\")) |
18 | if (sv_derived_from (arg, \"Coro::State\")) |
18 | $var = ($type) SvIV((SV*)SvRV(arg)); |
19 | $var = ($type) SvIV((SV*)SvRV(arg)); |
19 | else |
20 | else |
20 | croak (\"${Package}::$func_name() -- $var is not (and contains not) a Coro::State object\"); |
21 | croak (\"${Package}::$func_name() -- $var is not (and contains not) a Coro::State object\"); |
21 | } |
22 | } |