From 9e0dd1815278e189b6fd84046fc78e883cf85704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 26 Feb 2024 07:33:12 +0100 Subject: api: add function "hdata_longlong" (issue #2081) --- src/plugins/tcl/weechat-tcl-api.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/plugins/tcl') diff --git a/src/plugins/tcl/weechat-tcl-api.c b/src/plugins/tcl/weechat-tcl-api.c index 5a040c3f6..f6c26b276 100644 --- a/src/plugins/tcl/weechat-tcl-api.c +++ b/src/plugins/tcl/weechat-tcl-api.c @@ -5373,6 +5373,26 @@ API_FUNC(hdata_long) API_RETURN_LONG(result); } +API_FUNC(hdata_longlong) +{ + char *hdata, *pointer, *name; + long long result; + + API_INIT_FUNC(1, "hdata_longlong", API_RETURN_LONG(0)); + if (objc < 4) + API_WRONG_ARGS(API_RETURN_LONG(0)); + + hdata = Tcl_GetString (objv[1]); + pointer = Tcl_GetString (objv[2]); + name = Tcl_GetString (objv[3]); + + result = weechat_hdata_longlong (API_STR2PTR(hdata), + API_STR2PTR(pointer), + name); + + API_RETURN_LONG(result); +} + API_FUNC(hdata_string) { char *hdata, *pointer, *name; @@ -5887,6 +5907,7 @@ void weechat_tcl_api_init (Tcl_Interp *interp) API_DEF_FUNC(hdata_char); API_DEF_FUNC(hdata_integer); API_DEF_FUNC(hdata_long); + API_DEF_FUNC(hdata_longlong); API_DEF_FUNC(hdata_string); API_DEF_FUNC(hdata_pointer); API_DEF_FUNC(hdata_time); -- cgit v1.2.3