mirror of
https://github.com/janet-lang/janet
synced 2025-01-07 22:20:26 +00:00
Merge pull request #1506 from sogaiu/tweak-signal-doc
Add some detail to signal docstring
This commit is contained in:
commit
ee90f9df62
@ -700,7 +700,15 @@ JANET_CORE_FN(janet_core_is_lengthable,
|
|||||||
|
|
||||||
JANET_CORE_FN(janet_core_signal,
|
JANET_CORE_FN(janet_core_signal,
|
||||||
"(signal what x)",
|
"(signal what x)",
|
||||||
"Raise a signal with payload x. ") {
|
"Raise a signal with payload x. `what` can be an integer\n"
|
||||||
|
"from 0 through 7 indicating user(0-7), or one of:\n\n"
|
||||||
|
"* :ok\n"
|
||||||
|
"* :error\n"
|
||||||
|
"* :debug\n"
|
||||||
|
"* :yield\n"
|
||||||
|
"* :user(0-7)\n"
|
||||||
|
"* :interrupt\n"
|
||||||
|
"* :await") {
|
||||||
janet_arity(argc, 1, 2);
|
janet_arity(argc, 1, 2);
|
||||||
Janet payload = argc == 2 ? argv[1] : janet_wrap_nil();
|
Janet payload = argc == 2 ? argv[1] : janet_wrap_nil();
|
||||||
if (janet_checkint(argv[0])) {
|
if (janet_checkint(argv[0])) {
|
||||||
|
@ -79,6 +79,7 @@ const char *const janet_type_names[16] = {
|
|||||||
"pointer"
|
"pointer"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Docstring for signal lists these */
|
||||||
const char *const janet_signal_names[14] = {
|
const char *const janet_signal_names[14] = {
|
||||||
"ok",
|
"ok",
|
||||||
"error",
|
"error",
|
||||||
@ -96,6 +97,7 @@ const char *const janet_signal_names[14] = {
|
|||||||
"await"
|
"await"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Docstring for fiber/status lists these */
|
||||||
const char *const janet_status_names[16] = {
|
const char *const janet_status_names[16] = {
|
||||||
"dead",
|
"dead",
|
||||||
"error",
|
"error",
|
||||||
|
Loading…
Reference in New Issue
Block a user