1
0
mirror of https://github.com/janet-lang/janet synced 2025-02-04 19:29:10 +00:00

Fix #566 - bad docstring and bad arity for net/flush.

This commit is contained in:
Calvin Rose 2021-01-10 12:02:28 -06:00
parent 4625c28e6a
commit 1f6d0d342b
2 changed files with 5 additions and 5 deletions

View File

@ -325,12 +325,12 @@ static Janet cfun_debug_step(int32_t argc, Janet *argv) {
static const JanetReg debug_cfuns[] = { static const JanetReg debug_cfuns[] = {
{ {
"debug/break", cfun_debug_break, "debug/break", cfun_debug_break,
JDOC("(debug/break source byte-offset)\n\n" JDOC("(debug/break source line col)\n\n"
"Sets a breakpoint with source a key at a given line and column. " "Sets a breakpoint in `source` at a given line and column. "
"Will throw an error if the breakpoint location " "Will throw an error if the breakpoint location "
"cannot be found. For example\n\n" "cannot be found. For example\n\n"
"\t(debug/break \"core.janet\" 1000)\n\n" "\t(debug/break \"core.janet\" 10 4)\n\n"
"wil set a breakpoint at the 1000th byte of the file core.janet.") "wil set a breakpoint at line 10, 4th column of the file core.janet.")
}, },
{ {
"debug/unbreak", cfun_debug_unbreak, "debug/unbreak", cfun_debug_unbreak,

View File

@ -591,7 +591,7 @@ static Janet cfun_stream_send_to(int32_t argc, Janet *argv) {
} }
static Janet cfun_stream_flush(int32_t argc, Janet *argv) { static Janet cfun_stream_flush(int32_t argc, Janet *argv) {
janet_fixarity(argc, 2); janet_fixarity(argc, 1);
JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type); JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
janet_stream_flags(stream, JANET_STREAM_WRITABLE | JANET_STREAM_SOCKET); janet_stream_flags(stream, JANET_STREAM_WRITABLE | JANET_STREAM_SOCKET);
/* Toggle no delay flag */ /* Toggle no delay flag */