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

Function handle_luainit

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

Source from the content-addressed store, hash-verified

346
347
348static int handle_luainit (lua_State *L) {
349 const char *name = "=" LUA_INITVARVERSION;
350 const char *init = getenv(name + 1);
351 if (init == NULL) {
352 name = "=" LUA_INIT_VAR;
353 init = getenv(name + 1); /* try alternative name */
354 }
355 if (init == NULL) return LUA_OK;
356 else if (init[0] == '@')
357 return dofile(L, init+1);
358 else
359 return dostring(L, init, name);
360}
361
362
363/*

Callers 1

pmainFunction · 0.85

Calls 2

dofileFunction · 0.85
dostringFunction · 0.85

Tested by

no test coverage detected