X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/76e772f39a971e14e9c8cd077b68ad8ed8cc7f97..15108778d5dde69edd61dfe11372b071339ad108:/src/scripting.c diff --git a/src/scripting.c b/src/scripting.c index 99ca700c..1f441ae4 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -271,12 +271,15 @@ void luaLoadLib(lua_State *lua, const char *libname, lua_CFunction luafunc) { lua_call(lua, 1, 0); } +LUALIB_API int (luaopen_cjson) (lua_State *L); + void luaLoadLibraries(lua_State *lua) { luaLoadLib(lua, "", luaopen_base); luaLoadLib(lua, LUA_TABLIBNAME, luaopen_table); luaLoadLib(lua, LUA_STRLIBNAME, luaopen_string); luaLoadLib(lua, LUA_MATHLIBNAME, luaopen_math); luaLoadLib(lua, LUA_DBLIBNAME, luaopen_debug); + luaLoadLib(lua, "cjson", luaopen_cjson); #if 0 /* Stuff that we don't load currently, for sandboxing concerns. */ luaLoadLib(lua, LUA_LOADLIBNAME, luaopen_package);