MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / handle_luainit

Function handle_luainit

third-party/lua-5.2.4/src/lua.c:423–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421
422
423static int handle_luainit (lua_State *L) {
424 const char *name = "=" LUA_INITVERSION;
425 const char *init = getenv(name + 1);
426 if (init == NULL) {
427 name = "=" LUA_INIT;
428 init = getenv(name + 1); /* try alternative name */
429 }
430 if (init == NULL) return LUA_OK;
431 else if (init[0] == '@')
432 return dofile(L, init+1);
433 else
434 return dostring(L, init, name);
435}
436
437
438static int pmain (lua_State *L) {

Callers 1

pmainFunction · 0.70

Calls 2

dofileFunction · 0.70
dostringFunction · 0.70

Tested by

no test coverage detected