httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Champion <champio...@gmail.com>
Subject Re: svn commit: r1800835 - in /httpd/httpd/branches/2.4.x: ./ CHANGES modules/lua/README modules/lua/config.m4 modules/lua/lua_apr.c modules/lua/lua_config.c modules/lua/lua_request.c modules/lua/mod_lua.c modules/lua/mod_lua.h
Date Wed, 05 Jul 2017 20:10:48 GMT
On 07/05/2017 12:30 PM, Jacob Champion wrote:
> So... do we care?
If we do, here's a potential patch to *partially* return to the previous 
behavior:

--- modules/lua/lua_apr.c
+++ modules/lua/lua_apr.c
@@ -97,6 +97,12 @@ int ap_lua_init(lua_State *L, apr_pool_t *p)
      lua_gettable(L, 2);
      lua_settable(L, 1);

+#if LUA_VERSION_NUM >= 502
+    /* For compatibility, maintain the "apr_table" global that was used 
by the
+     * old luaL_register() implementation. */
+    lua_setglobal(L, "apr_table");
+#endif
+
      return 0;
  }

Lua's package.loaded["apr_table"] is still not set here, like it was 
with luaL_register. From quick Googling, I think that means it won't 
work with the deprecated module() system. I'm not a Lua programmer, so 
comments/review/advice welcome.

--Jacob

Mime
View raw message