You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2017/07/04 20:48:43 UTC
svn commit: r1800817 - /httpd/httpd/trunk/modules/lua/lua_apr.c
Author: rjung
Date: Tue Jul 4 20:48:43 2017
New Revision: 1800817
URL: http://svn.apache.org/viewvc?rev=1800817&view=rev
Log:
Fix last compat issue with Lua 5.2 and 5.3.
Patch taken from PR58188 which picked it from
openSUSE.
Still needs testing.
Modified:
httpd/httpd/trunk/modules/lua/lua_apr.c
Modified: httpd/httpd/trunk/modules/lua/lua_apr.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_apr.c?rev=1800817&r1=1800816&r2=1800817&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_apr.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_apr.c Tue Jul 4 20:48:43 2017
@@ -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);