1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

mod_lua: Improve compatibility with Lua 5.1, 5.2 and 5.3.

PR58188, PR60831, PR61245.

Still to solve: replace uses of luaL_register().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1800809 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Rainer Jung
2017-07-04 19:22:23 +00:00
parent b8e6337119
commit d1105fd4f2
3 changed files with 8 additions and 5 deletions

View File

@@ -1086,7 +1086,7 @@ static const char *register_named_block_function_hook(const char *name,
lua_dump(lvm, ldump_writer, &b);
#endif
luaL_pushresult(&b);
spec->bytecode_len = lua_strlen(lvm, -1);
spec->bytecode_len = lua_rawlen(lvm, -1);
spec->bytecode = apr_pstrmemdup(cmd->pool, lua_tostring(lvm, -1),
spec->bytecode_len);
lua_close(lvm);