MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaopen_base

Function luaopen_base

src/Chain/libraries/glua/lbaselib.cpp:647–658  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

645
646
647LUAMOD_API int luaopen_base(lua_State *L) {
648 /* open lib into global table */
649 lua_pushglobaltable(L);
650 luaL_setfuncs(L, base_funcs, 0);
651 /* set global _G */
652 lua_pushvalue(L, -1);
653 lua_setfield(L, -2, "_G");
654 /* set global _VERSION */
655 lua_pushliteral(L, LUA_VERSION);
656 lua_setfield(L, -2, "_VERSION");
657 return 1;
658}
659

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