MCPcopy Create free account
hub / github.com/Tencent/Tendis / luaLoadLibraries

Function luaLoadLibraries

src/tendisplus/script/lua_state.cpp:629–644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627}
628
629void luaLoadLibraries(lua_State* lua) {
630 luaLoadLib(lua, "", luaopen_base);
631 luaLoadLib(lua, LUA_TABLIBNAME, luaopen_table);
632 luaLoadLib(lua, LUA_STRLIBNAME, luaopen_string);
633 luaLoadLib(lua, LUA_MATHLIBNAME, luaopen_math);
634 luaLoadLib(lua, LUA_DBLIBNAME, luaopen_debug);
635 luaLoadLib(lua, "cjson", luaopen_cjson);
636 luaLoadLib(lua, "struct", luaopen_struct);
637 luaLoadLib(lua, "cmsgpack", luaopen_cmsgpack);
638 luaLoadLib(lua, "bit", luaopen_bit);
639
640#if 0 /* Stuff that we don't load currently, for sandboxing concerns. */
641 luaLoadLib(lua, LUA_LOADLIBNAME, luaopen_package);
642 luaLoadLib(lua, LUA_OSLIBNAME, luaopen_os);
643#endif
644}
645
646/* Remove a functions that we don't want to expose to the Redis scripting
647 * environment. */

Callers 1

initLuaMethod · 0.85

Calls 1

luaLoadLibFunction · 0.85

Tested by

no test coverage detected