Skip to content

Commit 844e842

Browse files
dndxagentzh
authored andcommitted
change: removed the use of luaL_getn() macro as it is no longer available in the latest LuaJIT v2.1. fixes #1029.
Signed-off-by: Yichun Zhang (agentzh) <yichun@openresty.com>
1 parent 113d138 commit 844e842

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ngx_http_lua_headers.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ ngx_http_lua_ngx_header_set(lua_State *L)
754754
ngx_str_null(&value);
755755

756756
} else if (lua_type(L, 3) == LUA_TTABLE) {
757-
n = luaL_getn(L, 3);
757+
n = lua_objlen(L, 3);
758758
if (n == 0) {
759759
ngx_str_null(&value);
760760

@@ -888,7 +888,7 @@ ngx_http_lua_ngx_req_header_set_helper(lua_State *L)
888888
ngx_str_null(&value);
889889

890890
} else if (lua_type(L, 2) == LUA_TTABLE) {
891-
n = luaL_getn(L, 2);
891+
n = lua_objlen(L, 2);
892892
if (n == 0) {
893893
ngx_str_null(&value);
894894

0 commit comments

Comments
 (0)