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

Function luaopen_base

3rd/lua-5.4.3/src/lbaselib.c:516–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514
515
516LUAMOD_API int luaopen_base (lua_State *L) {
517 /* open lib into global table */
518 lua_pushglobaltable(L);
519 luaL_setfuncs(L, base_funcs, 0);
520 /* set global _G */
521 lua_pushvalue(L, -1);
522 lua_setfield(L, -2, LUA_GNAME);
523 /* set global _VERSION */
524 lua_pushliteral(L, LUA_VERSION);
525 lua_setfield(L, -2, "_VERSION");
526 return 1;
527}
528

Callers

nothing calls this directly

Calls 3

luaL_setfuncsFunction · 0.85
lua_pushvalueFunction · 0.85
lua_setfieldFunction · 0.85

Tested by

no test coverage detected