diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-02-26 07:33:12 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-03-12 20:37:11 +0100 |
commit | 9e0dd1815278e189b6fd84046fc78e883cf85704 (patch) | |
tree | a7d8c6ed636ca02227cd140889d2bcc45aa2676e /src/plugins/perl/weechat-perl-api.c | |
parent | c85b57b8b399b980c5d6725fc33bef83d9727bfb (diff) | |
download | weechat-9e0dd1815278e189b6fd84046fc78e883cf85704.zip |
api: add function "hdata_longlong" (issue #2081)
Diffstat (limited to 'src/plugins/perl/weechat-perl-api.c')
-rw-r--r-- | src/plugins/perl/weechat-perl-api.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/plugins/perl/weechat-perl-api.c b/src/plugins/perl/weechat-perl-api.c index 89280fb8e..7c0c386bb 100644 --- a/src/plugins/perl/weechat-perl-api.c +++ b/src/plugins/perl/weechat-perl-api.c @@ -5392,6 +5392,27 @@ API_FUNC(hdata_long) API_RETURN_LONG(value); } +API_FUNC(hdata_longlong) +{ + char *hdata, *pointer, *name; + long long value; + dXSARGS; + + API_INIT_FUNC(1, "hdata_longlong", API_RETURN_LONG(0)); + if (items < 3) + API_WRONG_ARGS(API_RETURN_LONG(0)); + + hdata = SvPV_nolen (ST (0)); + pointer = SvPV_nolen (ST (1)); + name = SvPV_nolen (ST (2)); + + value = weechat_hdata_longlong (API_STR2PTR(hdata), + API_STR2PTR(pointer), + name); + + API_RETURN_LONG(value); +} + API_FUNC(hdata_string) { char *hdata, *pointer, *name; @@ -5888,6 +5909,7 @@ weechat_perl_api_init (pTHX) 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); |