MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / f_setvbuf

Function f_setvbuf

Source/Misc/lua/src/lua.c:12369–12377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12367
12368
12369static int f_setvbuf (lua_State *L) {
12370static const int mode[] = {_IONBF, _IOFBF, _IOLBF};
12371static const char *const modenames[] = {"no", "full", "line", NULL};
12372FILE *f = tofile(L);
12373int op = luaL_checkoption(L, 2, NULL, modenames);
12374lua_Integer sz = luaL_optinteger(L, 3, LUAL_BUFFERSIZE);
12375int res = setvbuf(f, NULL, mode[op], sz);
12376return pushresult(L, res == 0, NULL);
12377}
12378
12379
12380

Callers

nothing calls this directly

Calls 4

tofileFunction · 0.85
luaL_checkoptionFunction · 0.85
luaL_optintegerFunction · 0.85
pushresultFunction · 0.85

Tested by

no test coverage detected