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

Function luaopen_base

third-party/lua-5.5.0/src/lbaselib.c:547–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545
546
547LUAMOD_API int luaopen_base (lua_State *L) {
548 /* open lib into global table */
549 lua_pushglobaltable(L);
550 luaL_setfuncs(L, base_funcs, 0);
551 /* set global _G */
552 lua_pushvalue(L, -1);
553 lua_setfield(L, -2, LUA_GNAME);
554 /* set global _VERSION */
555 lua_pushliteral(L, LUA_VERSION);
556 lua_setfield(L, -2, "_VERSION");
557 return 1;
558}
559

Callers

nothing calls this directly

Calls 4

luaL_setfuncsFunction · 0.70
lua_pushvalueFunction · 0.70
lua_setfieldFunction · 0.70
lua_pushglobaltableFunction · 0.50

Tested by

no test coverage detected