MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / handle_script

Function handle_script

3rd/lua-5.4.3/src/lua.c:240–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238
239
240static int handle_script (lua_State *L, char **argv) {
241 int status;
242 const char *fname = argv[0];
243 if (strcmp(fname, "-") == 0 && strcmp(argv[-1], "--") != 0)
244 fname = NULL; /* stdin */
245 status = luaL_loadfile(L, fname);
246 if (status == LUA_OK) {
247 int n = pushargs(L); /* push arguments to script */
248 status = docall(L, n, LUA_MULTRET);
249 }
250 return report(L, status);
251}
252
253
254/* 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