mirror of
https://github.com/weechat/weechat.git
synced 2026-07-02 07:46:38 +02:00
api: change type of arguments status/gnutls_rc/sock in hook_connect() callback from string to integer (in scripts)
This commit is contained in:
@@ -8796,7 +8796,7 @@ hook3 = weechat.hook_process_hashtable("sh",
|
||||
|
||||
==== hook_connect
|
||||
|
||||
_Updated in 1.5._
|
||||
_Updated in 1.5, 2.0._
|
||||
|
||||
Hook a connection (background connection to a remote host).
|
||||
|
||||
@@ -8879,6 +8879,12 @@ Return value:
|
||||
|
||||
* pointer to new hook, NULL if error occurred
|
||||
|
||||
[IMPORTANT]
|
||||
In scripts, with WeeChat ≥ 2.0, the callback arguments _status_, _gnutls_rc_
|
||||
and _sock_ are integers (with WeeChat ≤ 1.9, they were strings). +
|
||||
To be compatible with all versions, it is recommended to convert the argument
|
||||
to integer before using it, for example in Python: `int(sock)`.
|
||||
|
||||
C example:
|
||||
|
||||
[source,C]
|
||||
|
||||
@@ -8961,7 +8961,7 @@ hook3 = weechat.hook_process_hashtable("sh",
|
||||
|
||||
==== hook_connect
|
||||
|
||||
_Mis à jour dans la 1.5._
|
||||
_Mis à jour dans la 1.5, 2.0._
|
||||
|
||||
Accrocher une connexion (connexion à une machine distante en tâche de fond).
|
||||
|
||||
@@ -9050,6 +9050,13 @@ Valeur de retour :
|
||||
|
||||
* pointeur vers le nouveau "hook", NULL en cas d'erreur
|
||||
|
||||
[IMPORTANT]
|
||||
Dans les scripts, avec WeeChat ≥ 2.0, les paramètres de la fonction de rappel
|
||||
_status_, _gnutls_rc_ et _sock_ sont des entiers (avec WeeChat ≤ 1.9, ils étaient
|
||||
des chaînes). +
|
||||
Pour être compatible avec toutes les versions, il est recommandé de convertir
|
||||
le paramètre avant de l'utiliser, par exemple en Python: `int(sock)`.
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,C]
|
||||
|
||||
@@ -9064,7 +9064,7 @@ hook3 = weechat.hook_process_hashtable("sh",
|
||||
==== hook_connect
|
||||
|
||||
// TRANSLATION MISSING
|
||||
_Updated in 1.5._
|
||||
_Updated in 1.5, 2.0._
|
||||
|
||||
Hook su una connessione (connessione in secondo piano ad un host remoto).
|
||||
|
||||
@@ -9152,6 +9152,13 @@ Valore restituito:
|
||||
|
||||
* puntatore al nuovo hook, NULL in caso di errore
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[IMPORTANT]
|
||||
In scripts, with WeeChat ≥ 2.0, the callback arguments _status_, _gnutls_rc_
|
||||
and _sock_ are integers (with WeeChat ≤ 1.9, they were strings). +
|
||||
To be compatible with all versions, it is recommended to convert the argument
|
||||
to integer before using it, for example in Python: `int(sock)`.
|
||||
|
||||
Esempio in C:
|
||||
|
||||
[source,C]
|
||||
|
||||
@@ -8808,7 +8808,8 @@ hook3 = weechat.hook_process_hashtable("sh",
|
||||
|
||||
==== hook_connect
|
||||
|
||||
_WeeChat バージョン 1.5 で更新。_
|
||||
// TRANSLATION MISSING
|
||||
_Updated in 1.5, 2.0._
|
||||
|
||||
接続をフックする (リモートホストへのバックグラウンド接続)。
|
||||
|
||||
@@ -8891,6 +8892,13 @@ struct t_hook *weechat_hook_connect (const char *proxy,
|
||||
|
||||
* 新しいフックへのポインタ、エラーが起きた場合は NULL
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[IMPORTANT]
|
||||
In scripts, with WeeChat ≥ 2.0, the callback arguments _status_, _gnutls_rc_
|
||||
and _sock_ are integers (with WeeChat ≤ 1.9, they were strings). +
|
||||
To be compatible with all versions, it is recommended to convert the argument
|
||||
to integer before using it, for example in Python: `int(sock)`.
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
[source,C]
|
||||
|
||||
Reference in New Issue
Block a user