-
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Thanks for the fork!
What version of Lua is used?
My patch for Lua > 5.1
--- a/src/luahooks.c
+++ b/src/luahooks.c
@@ -145,7 +145,7 @@ luahooks_init ()
if (opt.lua_filename == NULL)
return;
- lua = lua_open ();
+ lua = luaL_newstate ();;
luaL_openlibs (lua);
/* Initialize constants. */
@@ -489,7 +489,7 @@ luahooks_lookup_host (const char *host)
return NULL;
/* Copy to the buffer. */
- size_t ret_l = lua_strlen(lua, -1);
+ size_t ret_l = lua_rawlen(lua, -1);
ret_l = (ret_l <= MAX_HOST_LENGTH) ? ret_l : MAX_HOST_LENGTH;
strncpy (lookup_host_result, ret, ret_l);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels