summaryrefslogtreecommitdiff
path: root/doc/en
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-02-26 07:33:12 +0100
committerSébastien Helleu <flashcode@flashtux.org>2024-03-12 20:37:11 +0100
commit9e0dd1815278e189b6fd84046fc78e883cf85704 (patch)
treea7d8c6ed636ca02227cd140889d2bcc45aa2676e /doc/en
parentc85b57b8b399b980c5d6725fc33bef83d9727bfb (diff)
downloadweechat-9e0dd1815278e189b6fd84046fc78e883cf85704.zip
api: add function "hdata_longlong" (issue #2081)
Diffstat (limited to 'doc/en')
-rw-r--r--doc/en/weechat_plugin_api.en.adoc50
1 files changed, 48 insertions, 2 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index 5f47df843..4ef7eb658 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -18095,7 +18095,7 @@ This function is not available in scripting API.
==== hdata_new_var
-_WeeChat ≥ 0.3.6, updated in 0.3.7, 0.3.9, 0.4.3, 3.4._
+_WeeChat ≥ 0.3.6, updated in 0.3.7, 0.3.9, 0.4.3, 3.4, 4.3.0._
Create a new variable in hdata.
@@ -18116,6 +18116,7 @@ Arguments:
** _WEECHAT_HDATA_CHAR_
** _WEECHAT_HDATA_INTEGER_
** _WEECHAT_HDATA_LONG_
+** _WEECHAT_HDATA_LONGLONG_ (_WeeChat ≥ 4.3.0_)
** _WEECHAT_HDATA_STRING_
** _WEECHAT_HDATA_SHARED_STRING_ (_WeeChat ≥ 0.4.3_)
** _WEECHAT_HDATA_POINTER_
@@ -18396,6 +18397,9 @@ switch (type)
case WEECHAT_HDATA_LONG:
/* ... */
break;
+ case WEECHAT_HDATA_LONGLONG:
+ /* ... */
+ break;
case WEECHAT_HDATA_STRING:
/* ... */
break;
@@ -18997,7 +19001,7 @@ weechat.prnt("", "number = %d" % weechat.hdata_integer(hdata, buffer, "number"))
_WeeChat ≥ 0.3.6._
-Return value of long variable in structure using hdata.
+Return value of "long" variable in structure using hdata.
Prototype:
@@ -19035,6 +19039,48 @@ def hdata_long(hdata: str, pointer: str, name: str) -> int: ...
weechat.prnt("", "longvar = %d" % weechat.hdata_long(hdata, pointer, "longvar"))
----
+==== hdata_longlong
+
+_WeeChat ≥ 4.3.0._
+
+Return value of "long long" variable in structure using hdata.
+
+Prototype:
+
+[source,c]
+----
+long long weechat_hdata_longlong (struct t_hdata *hdata, void *pointer, const char *name);
+----
+
+Arguments:
+
+* _hdata_: hdata pointer
+* _pointer_: pointer to WeeChat/plugin object
+* _name_: variable name (must be type "long long"); for arrays, the name can be
+ "N|name" where N is the index in array (starting at 0), for example: "2|name"
+
+Return value:
+
+* long long value of variable
+
+C example:
+
+[source,c]
+----
+weechat_printf (NULL, "longlongvar = %lld", weechat_hdata_longlong (hdata, pointer, "longlongvar"));
+----
+
+Script (Python):
+
+[source,python]
+----
+# prototype
+def hdata_longlong(hdata: str, pointer: str, name: str) -> int: ...
+
+# example
+weechat.prnt("", "longlongvar = %d" % weechat.hdata_longlong(hdata, pointer, "longlongvar"))
+----
+
==== hdata_string
_WeeChat ≥ 0.3.6._