From 4e01c077d6ef6516e00b9e55cbf92a741a1d1239 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Sun, 26 May 2024 15:19:05 +0200 Subject: [PATCH] tcl: fix return value for hdata_longlong Using API_RETURN_LONG() here breaks tests on i368. --- src/plugins/tcl/weechat-tcl-api.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/tcl/weechat-tcl-api.c b/src/plugins/tcl/weechat-tcl-api.c index 487ad5d97..6bef61433 100644 --- a/src/plugins/tcl/weechat-tcl-api.c +++ b/src/plugins/tcl/weechat-tcl-api.c @@ -125,6 +125,11 @@ Tcl_SetObjResult (interp, Tcl_NewLongObj (__long)); \ return TCL_OK; \ } +#define API_RETURN_LONGLONG(__longlong) \ + { \ + Tcl_SetObjResult (interp, Tcl_NewWideIntObj (__longlong)); \ + return TCL_OK; \ + } #define API_RETURN_OBJ(__obj) \ { \ Tcl_SetObjResult (interp, __obj); \ @@ -5368,7 +5373,7 @@ API_FUNC(hdata_longlong) API_STR2PTR(pointer), name); - API_RETURN_LONG(result); + API_RETURN_LONGLONG(result); } API_FUNC(hdata_string)