MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaLoadLibraries

Function luaLoadLibraries

src/scripting.cpp:1072–1087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1070}
1071
1072void luaLoadLibraries(lua_State *lua) {
1073 luaLoadLib(lua, "", luaopen_base);
1074 luaLoadLib(lua, LUA_TABLIBNAME, luaopen_table);
1075 luaLoadLib(lua, LUA_STRLIBNAME, luaopen_string);
1076 luaLoadLib(lua, LUA_MATHLIBNAME, luaopen_math);
1077 luaLoadLib(lua, LUA_DBLIBNAME, luaopen_debug);
1078 luaLoadLib(lua, "cjson", luaopen_cjson);
1079 luaLoadLib(lua, "struct", luaopen_struct);
1080 luaLoadLib(lua, "cmsgpack", luaopen_cmsgpack);
1081 luaLoadLib(lua, "bit", luaopen_bit);
1082
1083#if 0 /* Stuff that we don't load currently, for sandboxing concerns. */
1084 luaLoadLib(lua, LUA_LOADLIBNAME, luaopen_package);
1085 luaLoadLib(lua, LUA_OSLIBNAME, luaopen_os);
1086#endif
1087}
1088
1089/* Remove a functions that we don't want to expose to the Redis scripting
1090 * environment. */

Callers 1

scriptingInitFunction · 0.85

Calls 1

luaLoadLibFunction · 0.85

Tested by

no test coverage detected