summaryrefslogtreecommitdiffstats
path: root/modules/lua/mod_lua.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/lua/mod_lua.h')
-rw-r--r--modules/lua/mod_lua.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/lua/mod_lua.h b/modules/lua/mod_lua.h
index 0e49cdc..33807fb 100644
--- a/modules/lua/mod_lua.h
+++ b/modules/lua/mod_lua.h
@@ -26,6 +26,7 @@
#include "http_request.h"
#include "http_log.h"
#include "http_protocol.h"
+#include "http_ssl.h"
#include "ap_regex.h"
#include "ap_config.h"
@@ -48,11 +49,20 @@
#if LUA_VERSION_NUM > 501
/* Load mode for lua_load() */
#define lua_load(a,b,c,d) lua_load(a,b,c,d,NULL)
-#define lua_resume(a,b) lua_resume(a, NULL, b)
+
+#if LUA_VERSION_NUM > 503
+#define lua_resume(a,b,c) lua_resume(a, NULL, b, c)
+#else
+/* ### For version < 5.4, assume that exactly one stack item is on the
+ * stack, which is what the code did before but seems dubious. */
+#define lua_resume(a,b,c) (*(c) = 1, lua_resume(a, NULL, b))
+#endif
+
#define luaL_setfuncs_compat(a,b) luaL_setfuncs(a,b,0)
#else
#define lua_rawlen(L,i) lua_objlen(L, (i))
#define luaL_setfuncs_compat(a,b) luaL_register(a,NULL,b)
+#define lua_resume(a,b,c) (*(c) = 1, lua_resume(a, b))
#endif
#if LUA_VERSION_NUM > 502
#define lua_dump(a,b,c) lua_dump(a,b,c,0)