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

Function luaopen_base

third-party/lua-5.2.4/src/lbaselib.c:447–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445
446
447LUAMOD_API int luaopen_base (lua_State *L) {
448 /* set global _G */
449 lua_pushglobaltable(L);
450 lua_pushglobaltable(L);
451 lua_setfield(L, -2, "_G");
452 /* open lib into global table */
453 luaL_setfuncs(L, base_funcs, 0);
454 lua_pushliteral(L, LUA_VERSION);
455 lua_setfield(L, -2, "_VERSION"); /* set global _VERSION */
456 return 1;
457}
458

Callers

nothing calls this directly

Calls 3

lua_setfieldFunction · 0.70
luaL_setfuncsFunction · 0.70
lua_pushglobaltableFunction · 0.50

Tested by

no test coverage detected