summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-08-13 09:29:39 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-08-13 09:29:39 +0200
commit5392e3078f454103c0606bb990ad8acffd7a4ae1 (patch)
treee82341d5a4037d1886874703bdb32de831d67683 /doc
parent2b7ea69d00526c0f94c20bf670da86344437e0d5 (diff)
downloadweechat-5392e3078f454103c0606bb990ad8acffd7a4ae1.zip
api: send file descriptor as integer instead of string to the callback of hook_fd
Diffstat (limited to 'doc')
-rw-r--r--doc/en/weechat_plugin_api.en.adoc8
-rw-r--r--doc/fr/weechat_plugin_api.fr.adoc9
-rw-r--r--doc/it/weechat_plugin_api.it.adoc9
-rw-r--r--doc/ja/weechat_plugin_api.ja.adoc10
4 files changed, 32 insertions, 4 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index 74729777b..dfcd28dc0 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -8275,7 +8275,7 @@ hook = weechat.hook_timer(20 * 1000, 0, 0, "my_timer_cb", "")
==== hook_fd
-_Updated in 1.3, 1.5._
+_Updated in 1.3, 1.5, 2.0._
Hook a file descriptor (file or socket).
@@ -8318,6 +8318,12 @@ Return value:
* pointer to new hook, NULL if error occurred
+[IMPORTANT]
+In scripts, with WeeChat ≥ 2.0, the callback argument _fd_ is an integer
+(with WeeChat ≤ 1.9, it was a string). +
+To be compatible with all versions, it is recommended to convert the argument
+to integer before using it, for example in Python: `int(fd)`.
+
C example:
[source,C]
diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc
index 342418aef..3c21d3709 100644
--- a/doc/fr/weechat_plugin_api.fr.adoc
+++ b/doc/fr/weechat_plugin_api.fr.adoc
@@ -8422,7 +8422,7 @@ hook = weechat.hook_timer(20 * 1000, 0, 0, "my_timer_cb", "")
==== hook_fd
-_Mis à jour dans la 1.3, 1.5._
+_Mis à jour dans la 1.3, 1.5, 2.0._
Accrocher un descripteur de fichier (fichier ou socket).
@@ -8467,6 +8467,13 @@ Valeur de retour :
* pointeur vers le nouveau "hook", NULL en cas d'erreur
+// TRANSLATION MISSING
+[IMPORTANT]
+Dans les scripts, avec WeeChat ≥ 2.0, le paramètre de la fonction de rappel _fd_
+est un entier (avec WeeChat ≤ 1.9, il était une chaîne). +
+Pour être compatible avec toutes les versions, il est recommandé de convertir le
+paramètre en entier avant de l'utiliser, par exemple en Python : `int(fd)`.
+
Exemple en C :
[source,C]
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index e8cdf9e1f..f74413ceb 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -8518,7 +8518,7 @@ hook = weechat.hook_timer(20 * 1000, 0, 0, "my_timer_cb", "")
==== hook_fd
// TRANSLATION MISSING
-_Updated in 1.3, 1.5._
+_Updated in 1.3, 1.5, 2.0._
Hook su un descrittore file (file oppure socket).
@@ -8563,6 +8563,13 @@ Valore restituito:
* puntatore al nuovo hook, NULL in caso di errore
+// TRANSLATION MISSING
+[IMPORTANT]
+In scripts, with WeeChat ≥ 2.0, the callback argument _fd_ is an integer
+(with WeeChat ≤ 1.9, it was a string). +
+To be compatible with all versions, it is recommended to convert the argument
+to integer before using it, for example in Python: `int(fd)`.
+
Esempio in C:
[source,C]
diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc
index e9b533af0..d013f56aa 100644
--- a/doc/ja/weechat_plugin_api.ja.adoc
+++ b/doc/ja/weechat_plugin_api.ja.adoc
@@ -8279,7 +8279,8 @@ hook = weechat.hook_timer(20 * 1000, 0, 0, "my_timer_cb", "")
==== hook_fd
-_WeeChat バージョン 1.3 と 1.5 で更新。_
+// TRANSLATION MISSING
+_Updated in 1.3, 1.5, 2.0._
ファイルディスクリプタ (ファイルやソケット) をフック。
@@ -8322,6 +8323,13 @@ struct t_hook *weechat_hook_fd (int fd,
* 新しいフックへのポインタ、エラーが起きた場合は NULL
+// TRANSLATION MISSING
+[IMPORTANT]
+In scripts, with WeeChat ≥ 2.0, the callback argument _fd_ is an integer
+(with WeeChat ≤ 1.9, it was a string). +
+To be compatible with all versions, it is recommended to convert the argument
+to integer before using it, for example in Python: `int(fd)`.
+
C 言語での使用例:
[source,C]