From 8eae450ea67c7136ca889f2676792e58b252ce14 Mon Sep 17 00:00:00 2001 From: zhaozg Date: Fri, 14 Oct 2022 16:12:17 +0800 Subject: [PATCH] add preload["rex_pcre"], it equals preload["rex"] close #269 --- src/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.c b/src/main.c index fb92c6f7..62fa6c9f 100644 --- a/src/main.c +++ b/src/main.c @@ -97,6 +97,8 @@ static lua_State* vm_acquire(){ #ifdef WITH_PCRE lua_pushcfunction(L, luaopen_rex_pcre); + lua_pushvalue(L, -1); + lua_setfield(L, -3, "rex_pcre"); lua_setfield(L, -2, "rex"); #endif