From 4e0133a955cb46c1dda18614bf91b4cb69874c63 Mon Sep 17 00:00:00 2001 From: Qi Date: Wed, 20 Mar 2024 09:29:47 +0800 Subject: [PATCH] perf: remove NYIs to be more JIT-friendly (#79) KAG-2653 --- lualib/resty/kong/var.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lualib/resty/kong/var.lua b/lualib/resty/kong/var.lua index 14f12247..a2fa73b1 100644 --- a/lualib/resty/kong/var.lua +++ b/lualib/resty/kong/var.lua @@ -108,7 +108,8 @@ local function var_get_by_index(index) value_len, errmsg) if rc == NGX_OK then - return ffi_str(value_ptr[0], value_len[0]) + local value = ffi_str(value_ptr[0], value_len[0]) + return value end if rc == NGX_DECLINED then