On 11/26/25 08:19, John Thacker wrote:
On Wed, Nov 26, 2025 at 10:50 AM John Thacker <[email protected]
<mailto:[email protected]>> wrote:
Unfortunately, Lua doesn't have a great way to determine the patch level
release (LUA_VERSION_NUM only gives the major and minor release numbers) to
determine that you're running precisely 5.4.6 or later, which is where
`lua_closethread` is available. Luckily the "deprecation" isn't actually
enforced. As
a comment in the code in `epan/wslua/init_wslua.c` notes, the plan is to
use an ifdef by the time Lua 5.5 is released (where they may, or may not,
actually
deprecate it for real.).
Lua 5.4 has LUA_VERSION_RELEASE_NUM (Lua 5.3 has the release number only separate
or as a string) which makes it easier to check. I'm not particularly >
interested in fixing the issue for one broken release of Lua, but if you really
have to get it running on that version it's not too hard to patch that file.
This seems to fix the build on F36. Would you want this patch upstream assuming
it works for others?
[greearb@vb-f36-64 wireshark]$ git diff
diff --git a/epan/wslua/init_wslua.c b/epan/wslua/init_wslua.c
index e33b2b2ae4..79cdcd1a0d 100644
--- a/epan/wslua/init_wslua.c
+++ b/epan/wslua/init_wslua.c
@@ -283,7 +283,11 @@ static void lua_resetthread_cb(void *user_data) {
// relies on garbage collection only.
// lua_closethread(..., NULL) was introduced in 5.4.6 to replace
// lua_resetthread() but it's not mandatory yet (maybe in 5.5?)
+#if LUA_VERSION_RELEASE_NUM == 50404
+ lua_resetthread(L1, NULL);
+#else
lua_resetthread(L1);
+#endif
#endif
// The thread was pushed onto the global stack when created. Each thread
// should be taken off the stack in order.
Thanks,
Ben
_______________________________________________
Wireshark-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
--
Ben Greear <[email protected]>
Candela Technologies Inc http://www.candelatech.com
_______________________________________________
Wireshark-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]