mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 00:03:12 +02:00
ruby: fix crash with Ruby 2.0: use one array for the last 6 arguments of function config_new_option (bug #31050)
This commit is contained in:
@@ -56,6 +56,16 @@ Ruby
|
||||
|
||||
* Es muss 'weechat_init' definiert und darin die Funktion 'register' ausgeführt werden
|
||||
* Funktionen werden im Format `Weechat.xxx(arg1, arg2, ...)` ausgeführt
|
||||
// TRANSLATION MISSING
|
||||
* Due to a limitation of Ruby (15 arguments max by function), the function
|
||||
`Weechat.config_new_option` receives the callbacks in an array of 6 strings
|
||||
(3 callbacks + 3 data strings), so a call to this function looks like:
|
||||
|
||||
[source,ruby]
|
||||
----------------------------------------
|
||||
Weechat.config_new_option(config, section, "name", "string", "description of option", "", 0, 0,
|
||||
"value", "value", 0, ["check_cb", "", "change_cb", "", "delete_cb", ""])
|
||||
----------------------------------------
|
||||
|
||||
Lua
|
||||
^^^
|
||||
|
||||
@@ -4352,6 +4352,11 @@ option5 = weechat.config_new_option(config_file, section, "option5", "color",
|
||||
"", "")
|
||||
----------------------------------------
|
||||
|
||||
[NOTE]
|
||||
In Ruby, the 3 callbacks + data (6 strings) must be given in an array of 6
|
||||
strings (due to a Ruby limitation of 15 arguments by function), see the
|
||||
'WeeChat Scripting Guide' for more info (_fixed in version 0.4.1_).
|
||||
|
||||
weechat_config_search_option
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -56,6 +56,15 @@ Ruby
|
||||
|
||||
* You have to define 'weechat_init' and call 'register' inside
|
||||
* Functions are called with `Weechat.xxx(arg1, arg2, ...)`
|
||||
* Due to a limitation of Ruby (15 arguments max by function), the function
|
||||
`Weechat.config_new_option` receives the callbacks in an array of 6 strings
|
||||
(3 callbacks + 3 data strings), so a call to this function looks like:
|
||||
|
||||
[source,ruby]
|
||||
----------------------------------------
|
||||
Weechat.config_new_option(config, section, "name", "string", "description of option", "", 0, 0,
|
||||
"value", "value", 0, ["check_cb", "", "change_cb", "", "delete_cb", ""])
|
||||
----------------------------------------
|
||||
|
||||
Lua
|
||||
^^^
|
||||
|
||||
@@ -4405,6 +4405,12 @@ option5 = weechat.config_new_option(config_file, section, "option5", "color",
|
||||
"", "")
|
||||
----------------------------------------
|
||||
|
||||
[NOTE]
|
||||
En Ruby, les 3 "callbacks" + "data" (6 chaînes) doivent être données dans un
|
||||
tableau de 6 chaînes de caractères (en raison d'une limitation de Ruby à 15
|
||||
paramètres par fonction), voir le 'Guide pour Scripts WeeChat' pour plus d'infos
|
||||
(_corrigé dans la version 0.4.1_).
|
||||
|
||||
weechat_config_search_option
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -57,6 +57,16 @@ Ruby
|
||||
|
||||
* Vous devez définir 'weechat_init' et appeler 'register' dedans
|
||||
* Les fonctions sont appelées par `Weechat.xxx(arg1, arg2, ...)`
|
||||
* En raison d'une limitation de Ruby (15 paramètres maximum par fonction), la
|
||||
fonction `Weechat.config_new_option` reçoit les "callbacks" dans un tableau de
|
||||
6 chaînes de caractères (3 callbacks + 3 chaînes de données), donc un appel à
|
||||
cette fonction ressemble à ceci :
|
||||
|
||||
[source,ruby]
|
||||
----------------------------------------
|
||||
Weechat.config_new_option(config, section, "name", "string", "description of option", "", 0, 0,
|
||||
"value", "value", 0, ["check_cb", "", "change_cb", "", "delete_cb", ""])
|
||||
----------------------------------------
|
||||
|
||||
Lua
|
||||
^^^
|
||||
|
||||
@@ -1436,7 +1436,7 @@ Extensions
|
||||
----------
|
||||
|
||||
Pour en apprendre plus sur le développement d'extension ou de script (via
|
||||
l'API), merci de consulter la 'Référence API Extension WeeChat' ou 'Le Guide
|
||||
l'API), merci de consulter la 'Référence API Extension WeeChat' ou le 'Guide
|
||||
pour Scripts WeeChat'.
|
||||
|
||||
[[plugins_in_weechat]]
|
||||
|
||||
@@ -4354,6 +4354,12 @@ option5 = weechat.config_new_option(config_file, section, "option5", "color",
|
||||
"", "")
|
||||
----------------------------------------
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[NOTE]
|
||||
In Ruby, the 3 callbacks + data (6 strings) must be given in an array of 6
|
||||
strings (due to a Ruby limitation of 15 arguments by function), see the
|
||||
'WeeChat Scripting Guide' for more info (_fixed in version 0.4.1_).
|
||||
|
||||
weechat_config_search_option
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -57,6 +57,16 @@ Ruby
|
||||
|
||||
* E necessario definire 'weechat_init' e chiamare 'register' all'interno
|
||||
* Le funzioni sono chiamate con `Weechat.xxx(arg1, arg2, ...)`
|
||||
// TRANSLATION MISSING
|
||||
* Due to a limitation of Ruby (15 arguments max by function), the function
|
||||
`Weechat.config_new_option` receives the callbacks in an array of 6 strings
|
||||
(3 callbacks + 3 data strings), so a call to this function looks like:
|
||||
|
||||
[source,ruby]
|
||||
----------------------------------------
|
||||
Weechat.config_new_option(config, section, "name", "string", "description of option", "", 0, 0,
|
||||
"value", "value", 0, ["check_cb", "", "change_cb", "", "delete_cb", ""])
|
||||
----------------------------------------
|
||||
|
||||
Lua
|
||||
^^^
|
||||
|
||||
@@ -49,6 +49,16 @@ WeeChat (Wee Enhanced Environment for Chat) はフリー、高速、軽量な
|
||||
|
||||
* 'weechat_init' を定義して、内部で 'register' を呼び出してください。
|
||||
* 関数は `Weechat.xxx(arg1, arg2, ...)` のように呼び出してください。
|
||||
// TRANSLATION MISSING
|
||||
* Due to a limitation of Ruby (15 arguments max by function), the function
|
||||
`Weechat.config_new_option` receives the callbacks in an array of 6 strings
|
||||
(3 callbacks + 3 data strings), so a call to this function looks like:
|
||||
|
||||
[source,ruby]
|
||||
----------------------------------------
|
||||
Weechat.config_new_option(config, section, "name", "string", "description of option", "", 0, 0,
|
||||
"value", "value", 0, ["check_cb", "", "change_cb", "", "delete_cb", ""])
|
||||
----------------------------------------
|
||||
|
||||
==== Lua ====
|
||||
|
||||
|
||||
@@ -56,6 +56,16 @@ Ruby
|
||||
|
||||
* Trzeba zdefiniować 'weechat_init' i wywołać 'register' wewnątrz
|
||||
* Funkcje są wywoływane za pomocą `Weechat.xxx(arg1, arg2, ...)`
|
||||
// TRANSLATION MISSING
|
||||
* Due to a limitation of Ruby (15 arguments max by function), the function
|
||||
`Weechat.config_new_option` receives the callbacks in an array of 6 strings
|
||||
(3 callbacks + 3 data strings), so a call to this function looks like:
|
||||
|
||||
[source,ruby]
|
||||
----------------------------------------
|
||||
Weechat.config_new_option(config, section, "name", "string", "description of option", "", 0, 0,
|
||||
"value", "value", 0, ["check_cb", "", "change_cb", "", "delete_cb", ""])
|
||||
----------------------------------------
|
||||
|
||||
Lua
|
||||
^^^
|
||||
|
||||
Reference in New Issue
Block a user