Skip to documentation
SLOP

tiny.mprompt.prompt

Reference tiny.mprompt prompt

Defined in tiny.mprompt.

Creates a prompt and enters it with fun and arg, which is promptCreate followed by promptEnter, so a caller runs a C-convention function on a new stacklet in one call.

Called byCallstest sourcelib.mprompt.src.prompttest: generator-style repeated tail r...test sourcelib.mprompt.src.prompttest: multi-shot resumption restores ...test sourcelib.mprompt.src.prompttest: prompt returns action resulttest sourcelib.mprompt.src.prompttest: suspended prompt can be resumed...test sourcelib.mprompt.src.prompttest: yield captures and resumes the ...tiny.mpromptpromptCreatetiny.mpromptpromptEntertiny.mpromptprompt
Static calls · unresolved targets: 0 · external targets: 0.

Source

Source: lib/mprompt/src/prompt.zig:472

zig
/// Creates a prompt and enters it with `fun` and `arg`, which is `promptCreate` followed by/// `promptEnter`, so a caller runs a C-convention function on a new stacklet in one call. The call/// returns what `fun` returns when it finishes, or what the yield function returns when `fun`/// suspends to this prompt. The stack switch exists for x86_64 and aarch64 targets other than/// Windows, and the package compiles only for 64-bit targets.pub fn prompt(fun: StartFn, arg: ?*anyopaque) ?*anyopaque {    const p = promptCreate();    return promptEnter(p, fun, arg);}

Source: lib/mprompt/src/root.zig:80

zig
pub const prompt = raw.prompt;

Audit

Definitions1
Public names1
Members0
Version26.7.0
Revisiondaab053ee433