… | |
… | |
979 | croak ("Coro::State::_newprocess expects an arrayref"); |
979 | croak ("Coro::State::_newprocess expects an arrayref"); |
980 | |
980 | |
981 | Newz (0, coro, 1, struct coro); |
981 | Newz (0, coro, 1, struct coro); |
982 | |
982 | |
983 | coro->args = (AV *)SvREFCNT_inc (SvRV (args)); |
983 | coro->args = (AV *)SvREFCNT_inc (SvRV (args)); |
984 | coro->mainstack = 0; /* actual work is done inside transfer */ |
984 | /*coro->mainstack = 0; *//*actual work is done inside transfer */ |
985 | coro->stack = 0; |
985 | /*coro->stack = 0;*/ |
986 | |
986 | |
987 | /* same as JMPENV_BOOTSTRAP */ |
987 | /* same as JMPENV_BOOTSTRAP */ |
988 | /* we might be able to recycle start_env, but safe is safe */ |
988 | /* we might be able to recycle start_env, but safe is safe */ |
989 | //Zero(&coro->start_env, 1, JMPENV); |
989 | /*Zero(&coro->start_env, 1, JMPENV);*/ |
990 | coro->start_env.je_ret = -1; |
990 | coro->start_env.je_ret = -1; |
991 | coro->start_env.je_mustcatch = TRUE; |
991 | coro->start_env.je_mustcatch = TRUE; |
992 | |
992 | |
993 | RETVAL = coro; |
993 | RETVAL = coro; |
994 | OUTPUT: |
994 | OUTPUT: |