1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-27 00:40:26 +00:00

Fix bug with ev/go when passing supervisor and value.

value was incorrectly set to nil in these cases. Also
fix some typos in core docstrings.
This commit is contained in:
Calvin Rose 2021-06-25 18:58:19 -05:00
parent 04ca945ecf
commit 5defc3b914
2 changed files with 3 additions and 3 deletions

View File

@ -333,7 +333,7 @@ static const JanetReg debug_cfuns[] = {
"Will throw an error if the breakpoint location "
"cannot be found. For example\n\n"
"\t(debug/break \"core.janet\" 10 4)\n\n"
"wil set a breakpoint at line 10, 4th column of the file core.janet.")
"will set a breakpoint at line 10, 4th column of the file core.janet.")
},
{
"debug/unbreak", cfun_debug_unbreak,
@ -383,7 +383,7 @@ static const JanetReg debug_cfuns[] = {
JDOC("(debug/stacktrace fiber &opt err)\n\n"
"Prints a nice looking stacktrace for a fiber. Can optionally provide "
"an error value to print the stack trace with. If `err` is nil or not "
"provided, will skipp the error line. Returns the fiber.")
"provided, will skip the error line. Returns the fiber.")
},
{
"debug/lineage", cfun_debug_lineage,

View File

@ -2038,7 +2038,7 @@ error:
static Janet cfun_ev_go(int32_t argc, Janet *argv) {
janet_arity(argc, 1, 3);
JanetFiber *fiber = janet_getfiber(argv, 0);
Janet value = argc == 2 ? argv[1] : janet_wrap_nil();
Janet value = argc >= 2 ? argv[1] : janet_wrap_nil();
JanetChannel *supervisor_channel = janet_optabstract(argv, argc, 2, &ChannelAT,
janet_vm_root_fiber->supervisor_channel);
fiber->supervisor_channel = supervisor_channel;