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

Function js_std_file_finalizer

deps/quickjs/quickjs-libc.c:1203–1211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1201}
1202
1203static void js_std_file_finalizer(JSRuntime *rt, JSValueConst val)
1204{
1205 JSThreadState *ts = js_get_thread_state(rt);
1206 JSSTDFile *s = JS_GetOpaque(val, ts->std_file_class_id);
1207 if (s) {
1208 safe_close(s->f, s->is_popen);
1209 js_free_rt(rt, s);
1210 }
1211}
1212
1213static ssize_t js_get_errno(ssize_t ret)
1214{

Callers

nothing calls this directly

Calls 2

js_get_thread_stateFunction · 0.85
safe_closeFunction · 0.85

Tested by

no test coverage detected