MCPcopy Create free account
hub / github.com/Cubitect/cubiomes-viewer / handle_script

Function handle_script

lua/src/lua.c:247–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245
246
247static int handle_script (lua_State *L, char **argv) {
248 int status;
249 const char *fname = argv[0];
250 if (strcmp(fname, "-") == 0 && strcmp(argv[-1], "--") != 0)
251 fname = NULL; /* stdin */
252 status = luaL_loadfile(L, fname);
253 if (status == LUA_OK) {
254 int n = pushargs(L); /* push arguments to script */
255 status = docall(L, n, LUA_MULTRET);
256 }
257 return report(L, status);
258}
259
260
261/* bits of various argument indicators in 'args' */

Callers 1

pmainFunction · 0.85

Calls 3

pushargsFunction · 0.85
docallFunction · 0.85
reportFunction · 0.85

Tested by

no test coverage detected