From 7e601d6d8ddbaf09640cb752f85df8f9526dd10f Mon Sep 17 00:00:00 2001 From: Hleran Date: Sun, 13 Sep 2015 07:01:12 +0300 Subject: [PATCH] lua_plugin: cache_exists_multi, no false pls return nil instead of false --- plugins/lua/lua_plugin.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/lua/lua_plugin.c b/plugins/lua/lua_plugin.c index 9064abc4..d52d3959 100644 --- a/plugins/lua/lua_plugin.c +++ b/plugins/lua/lua_plugin.c @@ -682,7 +682,12 @@ static int uwsgi_api_cache_exists_multi(lua_State *L) { for (i = 2; i <= argc; i++) { key = (char *) lua_tolstring(L, i, &keylen); - lua_pushboolean(L, keylen && uwsgi_cache_magic_exists(key, keylen, cache)); + + if (keylen && uwsgi_cache_magic_exists(key, keylen, cache)) { + lua_pushboolean(L, 1); + } else { + lua_pushnil(L); + } }