MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / luaopen_package

Function luaopen_package

modules/engine/lua/src/build.skr_lua.cpp:133–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131};
132
133LUALIB_API int luaopen_package (lua_State *L) {
134 /* set field `loaded' */
135 luaL_findtable(L, LUA_REGISTRYINDEX, "_LOADED", 2);
136 lua_pop(L, 1);
137 lua_pushvalue(L, LUA_GLOBALSINDEX);
138 luaL_register(L, NULL, ll_funcs); /* open lib into global table */
139 return 0; /* return 'package' table */
140}
141
142lua_State* skr_lua_newstate(skr_vfs_t* vfs)
143{

Callers 1

skr_lua_newstateFunction · 0.70

Calls 3

luaL_findtableFunction · 0.85
luaL_registerFunction · 0.85
lua_pushvalueFunction · 0.50

Tested by

no test coverage detected