MCPcopy Create free account
hub / github.com/DFHack/dfhack / aux_lines

Function aux_lines

depends/lua/src/liolib.c:341–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339#define MAXARGLINE 250
340
341static void aux_lines (lua_State *L, int toclose) {
342 int n = lua_gettop(L) - 1; /* number of arguments to read */
343 luaL_argcheck(L, n <= MAXARGLINE, MAXARGLINE + 2, "too many arguments");
344 lua_pushinteger(L, n); /* number of arguments to read */
345 lua_pushboolean(L, toclose); /* close/not close file when finished */
346 lua_rotate(L, 2, 2); /* move 'n' and 'toclose' to their positions */
347 lua_pushcclosure(L, io_readline, 3 + n);
348}
349
350
351static int f_lines (lua_State *L) {

Callers 2

f_linesFunction · 0.85
io_linesFunction · 0.85

Calls 5

lua_gettopFunction · 0.85
lua_pushintegerFunction · 0.85
lua_pushbooleanFunction · 0.85
lua_rotateFunction · 0.85
lua_pushcclosureFunction · 0.85

Tested by

no test coverage detected