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

Function handle_luainit

third-party/lua-5.5.0/src/lua.c:377–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375
376
377static int handle_luainit (lua_State *L) {
378 const char *name = "=" LUA_INITVARVERSION;
379 const char *init = getenv(name + 1);
380 if (init == NULL) {
381 name = "=" LUA_INIT_VAR;
382 init = getenv(name + 1); /* try alternative name */
383 }
384 if (init == NULL) return LUA_OK;
385 else if (init[0] == '@')
386 return dofile(L, init+1);
387 else
388 return dostring(L, init, name);
389}
390
391
392/*

Callers 1

pmainFunction · 0.70

Calls 2

dofileFunction · 0.70
dostringFunction · 0.70

Tested by

no test coverage detected