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
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);