1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-08 18:53:12 +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:
Sébastien Helleu
2017-08-13 10:40:01 +02:00
parent bf0df282a2
commit bfef8da84c
13 changed files with 70 additions and 67 deletions
+8 -1
View File
@@ -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]