Skip to content

Commit adc1619

Browse files
committed
fix non ffi method
1 parent ac9f37c commit adc1619

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ngx_http_lua_shdict.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,8 +1277,8 @@ ngx_http_lua_shdict_incr(lua_State *L)
12771277

12781278
n = lua_gettop(L);
12791279

1280-
if (n != 3 && n != 4) {
1281-
return luaL_error(L, "expecting 3 or 4 arguments, but only seen %d", n);
1280+
if (n != 3 && n != 4 && n != 5) {
1281+
return luaL_error(L, "expecting 3-5 arguments, but only seen %d", n);
12821282
}
12831283

12841284
if (lua_type(L, 1) != LUA_TTABLE) {
@@ -1316,8 +1316,8 @@ ngx_http_lua_shdict_incr(lua_State *L)
13161316

13171317
value = luaL_checknumber(L, 3);
13181318

1319-
if (n == 4) {
1320-
init = luaL_checknumber(L, 4);
1319+
if (n == 5) {
1320+
init = luaL_checknumber(L, 5);
13211321
}
13221322

13231323
dd("looking up key %.*s in shared dict %.*s", (int) key.len, key.data,

0 commit comments

Comments
 (0)