From 3490bd62b694a51d9837288ab919dbc027b2d8f9 Mon Sep 17 00:00:00 2001 From: Rainer Jung Date: Tue, 4 Jul 2017 20:48:43 +0000 Subject: [PATCH] Fix last compat issue with Lua 5.2 and 5.3. Patch taken from PR58188 which picked it from openSUSE. Still needs testing. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1800817 13f79535-47bb-0310-9956-ffa450edef68 --- modules/lua/lua_apr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/lua/lua_apr.c b/modules/lua/lua_apr.c index fd3ba20e7a..8e34cf3082 100644 --- a/modules/lua/lua_apr.c +++ b/modules/lua/lua_apr.c @@ -82,7 +82,11 @@ static const luaL_Reg lua_table_methods[] = { int ap_lua_init(lua_State *L, apr_pool_t *p) { luaL_newmetatable(L, "Apr.Table"); +#if LUA_VERSION_NUM < 502 luaL_register(L, "apr_table", lua_table_methods); +#else + luaL_newlib(L, lua_table_methods); +#endif lua_pushstring(L, "__index"); lua_pushstring(L, "get"); lua_gettable(L, 2); -- 2.40.0