]> git.saurik.com Git - redis.git/blobdiff - src/scripting.c
Suppress warnings compiling redis-cli with certain gcc versions.
[redis.git] / src / scripting.c
index 2eac840c52e5707829a57f5deab6950d9bf086cc..ce1f0877bf47a3b2c002786b348f567d0db98349 100644 (file)
@@ -221,7 +221,8 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) {
     if (cmd->flags & REDIS_CMD_WRITE) server.lua_write_dirty = 1;
 
     /* Run the command */
-    cmd->proc(c);
+    c->cmd = cmd;
+    call(c,REDIS_CALL_SLOWLOG | REDIS_CALL_STATS);
 
     /* Convert the result of the Redis command into a suitable Lua type.
      * The first thing we need is to create a single string from the client
@@ -342,6 +343,8 @@ void luaLoadLib(lua_State *lua, const char *libname, lua_CFunction luafunc) {
 }
 
 LUALIB_API int (luaopen_cjson) (lua_State *L);
+LUALIB_API int (luaopen_struct) (lua_State *L);
+LUALIB_API int (luaopen_cmsgpack) (lua_State *L);
 
 void luaLoadLibraries(lua_State *lua) {
     luaLoadLib(lua, "", luaopen_base);
@@ -349,7 +352,9 @@ void luaLoadLibraries(lua_State *lua) {
     luaLoadLib(lua, LUA_STRLIBNAME, luaopen_string);
     luaLoadLib(lua, LUA_MATHLIBNAME, luaopen_math);
     luaLoadLib(lua, LUA_DBLIBNAME, luaopen_debug); 
-    luaLoadLib(lua, "cjson", luaopen_cjson); 
+    luaLoadLib(lua, "cjson", luaopen_cjson);
+    luaLoadLib(lua, "struct", luaopen_struct);
+    luaLoadLib(lua, "cmsgpack", luaopen_cmsgpack);
 
 #if 0 /* Stuff that we don't load currently, for sandboxing concerns. */
     luaLoadLib(lua, LUA_LOADLIBNAME, luaopen_package);