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

Function js_std_file_get

deps/quickjs/quickjs-libc.c:1391–1403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1389}
1390
1391static FILE *js_std_file_get(JSContext *ctx, JSValueConst obj)
1392{
1393 JSRuntime *rt = JS_GetRuntime(ctx);
1394 JSThreadState *ts = js_get_thread_state(rt);
1395 JSSTDFile *s = JS_GetOpaque2(ctx, obj, ts->std_file_class_id);
1396 if (!s)
1397 return NULL;
1398 if (!s->f) {
1399 JS_ThrowTypeError(ctx, "invalid file handle");
1400 return NULL;
1401 }
1402 return s->f;
1403}
1404
1405static JSValue js_std_file_puts(JSContext *ctx, JSValueConst this_val,
1406 int argc, JSValueConst *argv, int magic)

Callers 14

js_std_file_putsFunction · 0.85
js_std_file_printfFunction · 0.85
js_std_file_flushFunction · 0.85
js_std_file_tellFunction · 0.85
js_std_file_seekFunction · 0.85
js_std_file_eofFunction · 0.85
js_std_file_errorFunction · 0.85
js_std_file_clearerrFunction · 0.85
js_std_file_filenoFunction · 0.85
js_std_file_read_writeFunction · 0.85
js_std_file_getlineFunction · 0.85
js_std_file_readAsFunction · 0.85

Calls 1

js_get_thread_stateFunction · 0.85

Tested by

no test coverage detected