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

Function js_std_file_getByte

deps/quickjs/quickjs-libc.c:1675–1682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1673}
1674
1675static JSValue js_std_file_getByte(JSContext *ctx, JSValueConst this_val,
1676 int argc, JSValueConst *argv)
1677{
1678 FILE *f = js_std_file_get(ctx, this_val);
1679 if (!f)
1680 return JS_EXCEPTION;
1681 return JS_NewInt32(ctx, fgetc(f));
1682}
1683
1684static JSValue js_std_file_putByte(JSContext *ctx, JSValueConst this_val,
1685 int argc, JSValueConst *argv)

Callers

nothing calls this directly

Calls 2

js_std_file_getFunction · 0.85
JS_NewInt32Function · 0.85

Tested by

no test coverage detected