[FarGroup/FarManager] master: LuaFAR: make tostring on bit64 output in hex (85fc74533)

1 view
Skip to first unread message

farg...@farmanager.com

unread,
Jun 9, 2024, 3:00:46 PMJun 9
to farco...@googlegroups.com
Repository : https://github.com/FarGroup/FarManager
On branch : master
Link : https://github.com/FarGroup/FarManager/commit/85fc745331ed52b91c4bfe16e595a0a87616fa33

>---------------------------------------------------------------

commit 85fc745331ed52b91c4bfe16e595a0a87616fa33
Author: Shmuel Zeigerman <solo...@gmail.com>
Date: Sun Jun 9 21:55:16 2024 +0300

LuaFAR: make tostring on bit64 output in hex


>---------------------------------------------------------------

85fc745331ed52b91c4bfe16e595a0a87616fa33
plugins/luamacro/_globalinfo.lua | 2 +-
plugins/luamacro/changelog | 4 ++++
plugins/luamacro/luafar/bit64.c | 6 ++++--
plugins/luamacro/luafar/version.h | 2 +-
4 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/plugins/luamacro/_globalinfo.lua b/plugins/luamacro/_globalinfo.lua
index a05696e92..b74939e83 100644
--- a/plugins/luamacro/_globalinfo.lua
+++ b/plugins/luamacro/_globalinfo.lua
@@ -1,6 +1,6 @@
function export.GetGlobalInfo()
return {
- Version = { 3, 0, 0, 840 },
+ Version = { 3, 0, 0, 841 },
MinFarVersion = { 3, 0, 0, 6327 },
Guid = win.Uuid("4EBBEFC8-2084-4B7F-94C0-692CE136894D"),
Title = "LuaMacro",
diff --git a/plugins/luamacro/changelog b/plugins/luamacro/changelog
index c0f4ff064..c3d17bb8e 100644
--- a/plugins/luamacro/changelog
+++ b/plugins/luamacro/changelog
@@ -1,3 +1,7 @@
+shmuel 2024-06-09 21:52:16+03:00 - build 841
+
+1. LuaFAR: make tostring on bit64 output in hex.
+
zg 2024-06-04 00:07:01+03:00 - build 840

1. Adaptation to Far 3.0.6342.
diff --git a/plugins/luamacro/luafar/bit64.c b/plugins/luamacro/luafar/bit64.c
index ce6886fb1..c7a39463c 100644
--- a/plugins/luamacro/luafar/bit64.c
+++ b/plugins/luamacro/luafar/bit64.c
@@ -1,4 +1,6 @@
-#include <lua.h>
+#include <inttypes.h>
+
+#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>

@@ -213,7 +215,7 @@ static int f_new(lua_State *L)
static int f_tostring(lua_State *L)
{
char buf[32];
- sprintf(buf, "%lld", check64(L,1,NULL));
+ sprintf(buf, "0x%" PRIX64, check64(L,1,NULL));
lua_pushstring(L, buf);
return 1;
}
diff --git a/plugins/luamacro/luafar/version.h b/plugins/luamacro/luafar/version.h
index c7e3daf30..fd5c1b5d9 100644
--- a/plugins/luamacro/luafar/version.h
+++ b/plugins/luamacro/luafar/version.h
@@ -1,3 +1,3 @@
#include <farversion.hpp>

-#define PLUGIN_BUILD 840
+#define PLUGIN_BUILD 841


Reply all
Reply to author
Forward
0 new messages