aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2026-03-28 03:48:09 +0100
committerPřemysl Eric Janouch <p@janouch.name>2026-03-28 03:50:44 +0100
commit5ba2c825a17cd9b7f2ef2c628b0e310d1c47a981 (patch)
tree8f5be0a1018432119c00b3a3b12a77d307a54947
parentd11bd2c54e9328f7208a3c37f67c8ba801698c1b (diff)
downloadxK-5ba2c825a17cd9b7f2ef2c628b0e310d1c47a981.tar.gz
xK-5ba2c825a17cd9b7f2ef2c628b0e310d1c47a981.tar.xz
xK-5ba2c825a17cd9b7f2ef2c628b0e310d1c47a981.zip
xC: fix Lua 5.5 buildorigin/master
Everything appears to work, not inspecting this in depth.
-rw-r--r--CMakeLists.txt3
-rw-r--r--NEWS5
-rw-r--r--xC.c4
3 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58bb331..43ea33c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -94,7 +94,8 @@ include_directories (${libffi_INCLUDE_DIRS})
link_directories (${libffi_LIBRARY_DIRS})
# XXX: other Lua versions may be acceptable, don't know yet
-pkg_search_module (lua lua53 lua5.3 lua-5.3 lua54 lua5.4 lua-5.4 lua>=5.3)
+pkg_search_module (lua
+ lua53 lua5.3 lua-5.3 lua54 lua5.4 lua-5.4 lua55 lua5.5 lua-5.5 lua>=5.3)
option (WITH_LUA "Enable support for Lua plugins" ${lua_FOUND})
if (WITH_LUA)
diff --git a/NEWS b/NEWS
index ba80e73..b034ece 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+Unreleased
+
+ * xC: added support for Lua 5.5
+
+
2.2.0 (2026-01-10) "Just Doing the Needful"
* xC: added more characters as nickname delimiters,
diff --git a/xC.c b/xC.c
index f3d58ce..54b60d6 100644
--- a/xC.c
+++ b/xC.c
@@ -11633,7 +11633,11 @@ static struct plugin *
lua_plugin_load (struct app_context *ctx, const char *filename,
struct error **e)
{
+#if LUA_VERSION_NUM >= 505
+ lua_State *L = lua_newstate (lua_plugin_alloc, NULL, 0);
+#else
lua_State *L = lua_newstate (lua_plugin_alloc, NULL);
+#endif
if (!L)
{
error_set (e, "Lua initialization failed");