MCPcopy Create free account
hub / github.com/buke/quickjs-go / js_std_file_putByte

Function js_std_file_putByte

deps/quickjs/quickjs-libc.c:1684–1695  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1682}
1683
1684static JSValue js_std_file_putByte(JSContext *ctx, JSValueConst this_val,
1685 int argc, JSValueConst *argv)
1686{
1687 FILE *f = js_std_file_get(ctx, this_val);
1688 int c;
1689 if (!f)
1690 return JS_EXCEPTION;
1691 if (JS_ToInt32(ctx, &c, argv[0]))
1692 return JS_EXCEPTION;
1693 c = fputc(c, f);
1694 return JS_NewInt32(ctx, c);
1695}
1696
1697/* urlGet */
1698#if !defined(__wasi__)

Callers

nothing calls this directly

Calls 2

js_std_file_getFunction · 0.85
JS_NewInt32Function · 0.85

Tested by

no test coverage detected