From 0637e9f629a14d19403873b49f04aee400e3bf9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 12 Aug 2024 08:22:48 +0200 Subject: [PATCH] lua: remote string "Lua" from Lua version in output of `/debug libs` --- CHANGELOG.md | 1 + src/plugins/lua/weechat-lua.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a9070f66..9b9802864 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -80,6 +80,7 @@ - relay: fix allocation and reinit of field "client_context_takeover" in websocket deflate structure ([#1549](https://github.com/weechat/weechat/issues/1549)) - spell: improve error displayed when a word can not be added to the dictionary ([#2144](https://github.com/weechat/weechat/issues/2144)) - core: fix completion of command `/item refresh` +- lua: remote string "Lua" from Lua version in output of `/debug libs` - core: fix detection of libgcrypt ≥ 1.11 ([debian #1071960](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1071960)) - core, relay: fix include directory of libcjson and libzstd - tests: fix relay tests on s390x ([#2118](https://github.com/weechat/weechat/issues/2118)) diff --git a/src/plugins/lua/weechat-lua.c b/src/plugins/lua/weechat-lua.c index 8fb917359..db948f6c1 100644 --- a/src/plugins/lua/weechat-lua.c +++ b/src/plugins/lua/weechat-lua.c @@ -1269,7 +1269,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) /* set interpreter name and version */ weechat_hashtable_set (plugin->variables, "interpreter_name", plugin->name); -#ifdef LUA_VERSION +#if defined(LUA_VERSION_MAJOR) && defined(LUA_VERSION_MINOR) + weechat_hashtable_set (plugin->variables, "interpreter_version", + LUA_VERSION_MAJOR "." LUA_VERSION_MINOR); +#elif LUA_VERSION weechat_hashtable_set (plugin->variables, "interpreter_version", LUA_VERSION); #else