diff options
-rw-r--r-- | ChangeLog.adoc | 2 | ||||
-rw-r--r-- | doc/en/weechat_plugin_api.en.adoc | 60 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.adoc | 60 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.adoc | 63 | ||||
-rw-r--r-- | doc/ja/weechat_plugin_api.ja.adoc | 64 | ||||
-rw-r--r-- | doc/sr/weechat_plugin_api.sr.adoc | 63 | ||||
-rw-r--r-- | src/core/wee-config-file.c | 2 | ||||
-rw-r--r-- | src/core/wee-hdata.c | 83 | ||||
-rw-r--r-- | src/core/wee-hdata.h | 2 | ||||
-rw-r--r-- | src/gui/gui-buffer.c | 4 | ||||
-rw-r--r-- | src/gui/gui-filter.c | 2 | ||||
-rw-r--r-- | src/gui/gui-line.c | 2 | ||||
-rw-r--r-- | src/plugins/irc/irc-server.c | 10 |
13 files changed, 328 insertions, 89 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 8955d6f42..96cab16e8 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] New features:: + * core: add support of static arrays in hdata * core: add command /toggle * api: add user variables in evaluation of expressions with "define:name,value" * api: add IRC message parameters "param1" to "paramN" and "num_params" in output of irc_message_parse @@ -27,6 +28,7 @@ New features:: Bug fixes:: + * core: fix access to integer/long/time arrays in hdata * api: fix search of option when the section is not given in functions config_search_option and config_search_section_option * irc: fix parsing of parameters in all IRC messages (issue #1666) * irc: fix parsing of CAP message when there is no prefix (issue #1707) diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index 610406fd6..d6ff39a3c 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -16408,7 +16408,7 @@ This function is not available in scripting API. ==== hdata_new_var -_WeeChat ≥ 0.3.6, updated in 0.3.9._ +_WeeChat ≥ 0.3.6, updated in 0.3.7, 0.3.9, 0.4.3 and 3.4._ Create a new variable in hdata. @@ -16426,15 +16426,15 @@ Arguments: * _name_: variable name * _offset_: offset of variable in structure * _type_: variable type, one of: -** WEECHAT_HDATA_CHAR -** WEECHAT_HDATA_INTEGER -** WEECHAT_HDATA_LONG -** WEECHAT_HDATA_STRING -** WEECHAT_HDATA_SHARED_STRING -** WEECHAT_HDATA_POINTER -** WEECHAT_HDATA_TIME -** WEECHAT_HDATA_HASHTABLE -** WEECHAT_HDATA_OTHER +** _WEECHAT_HDATA_CHAR_ +** _WEECHAT_HDATA_INTEGER_ +** _WEECHAT_HDATA_LONG_ +** _WEECHAT_HDATA_STRING_ +** _WEECHAT_HDATA_SHARED_STRING_ (_WeeChat ≥ 0.4.3_) +** _WEECHAT_HDATA_POINTER_ +** _WEECHAT_HDATA_TIME_ +** _WEECHAT_HDATA_HASHTABLE_ (_WeeChat ≥ 0.3.7_) +** _WEECHAT_HDATA_OTHER_ * _update_allowed_: 1 if update of variable is allowed, otherwise 0 _(WeeChat ≥ 0.3.9)_ * _array_size_: not NULL only if a variable is an array, and it can be: @@ -16446,6 +16446,35 @@ Arguments: the first NULL is found (only for type string, pointer or hashtable) * _hdata_name_: name of a hdata (if it's a pointer to a structure with hdata) +With WeeChat ≥ 3.4, the _array_size_ parameter can be prefixed with `*,` for +pointer to dynamically allocated array (without this prefix, the array is +considered static). + +Examples of variables and the corresponding array size (_WeeChat ≥ 3.4_): + +[width="100%",cols="3,3m,2,7",options="header"] +|=== +| Variable declaration in C | Hdata type | Array size | Description + +| `+int *numbers;+` | WEECHAT_HDATA_INTEGER | `+*,2+` | + Allocated array of 2 integers. + +| `+int *numbers;+` | WEECHAT_HDATA_INTEGER | `+*,array_size+` | + Allocated array of integers, the size is stored in another variable called + "array_size". + +| `+int numbers[3];+` | WEECHAT_HDATA_INTEGER | `+3+` | + Static array of 3 integers. + +| `+char **words;+` | WEECHAT_HDATA_STRING | `+*,*+` | + Allocated array of strings, dynamic size (NULL pointer must be present after + last word). + +| `+char **words;+` | WEECHAT_HDATA_STRING | `+*,count_words+` | + Allocated array of strings, the size is stored in another variable called + "count_words". +|=== + C example: [source,C] @@ -16454,6 +16483,7 @@ struct t_myplugin_list { char *name; struct t_gui_buffer *buffer; + int numbers[3]; int tags_count; char **tags_array; char **string_split; @@ -16466,9 +16496,10 @@ struct t_myplugin_list struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next"); weechat_hdata_new_var (hdata, "name", offsetof (struct t_myplugin_list, name), WEECHAT_HDATA_STRING, 0, NULL, NULL); weechat_hdata_new_var (hdata, "buffer", offsetof (struct t_myplugin_list, buffer), WEECHAT_HDATA_POINTER, 0, NULL, NULL); +weechat_hdata_new_var (hdata, "numbers", offsetof (struct t_myplugin_list, numbers), WEECHAT_HDATA_INTEGER, 0, "3", NULL); weechat_hdata_new_var (hdata, "tags_count", offsetof (struct t_myplugin_list, tags_count), WEECHAT_HDATA_INTEGER, 0, NULL, NULL); -weechat_hdata_new_var (hdata, "tags_array", offsetof (struct t_myplugin_list, tags_array), WEECHAT_HDATA_STRING, 0, "tags_count", NULL); -weechat_hdata_new_var (hdata, "string_split", offsetof (struct t_myplugin_list, string_split), WEECHAT_HDATA_STRING, 0, "*", NULL); +weechat_hdata_new_var (hdata, "tags_array", offsetof (struct t_myplugin_list, tags_array), WEECHAT_HDATA_STRING, 0, "*,tags_count", NULL); +weechat_hdata_new_var (hdata, "string_split", offsetof (struct t_myplugin_list, string_split), WEECHAT_HDATA_STRING, 0, "*,*", NULL); weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); ---- @@ -16479,9 +16510,10 @@ The macro "WEECHAT_HDATA_VAR" can be used to shorten code: ---- WEECHAT_HDATA_VAR(struct t_myplugin_list, name, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, buffer, POINTER, 0, NULL, NULL); +WEECHAT_HDATA_VAR(struct t_myplugin_list, numbers, INTEGER, 0, "3", NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_count, INTEGER, 0, NULL, NULL); -WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_array, STRING, 0, "tags_count", NULL); -WEECHAT_HDATA_VAR(struct t_myplugin_list, string_split, STRING, 0, "*", NULL); +WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_array, STRING, 0, "*,tags_count", NULL); +WEECHAT_HDATA_VAR(struct t_myplugin_list, string_split, STRING, 0, "*,*", NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, prev, POINTER, 0, NULL, "myplugin_list"); WEECHAT_HDATA_VAR(struct t_myplugin_list, next, POINTER, 0, NULL, "myplugin_list"); ---- diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index 490676564..60e3c58f0 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -16753,7 +16753,7 @@ Cette fonction n'est pas disponible dans l'API script. ==== hdata_new_var -_WeeChat ≥ 0.3.6._ +_WeeChat ≥ 0.3.6, mis à jour dans la 0.3.7, 0.3.9, 0.4.3 et 3.4._ Créer une nouvelle variable dans le hdata. @@ -16771,15 +16771,15 @@ Paramètres : * _name_ : nom de la variable * _offset_ : position (offset) de la variable dans la structure * _type_ : type de la variable, un parmi ceux-ci : -** WEECHAT_HDATA_CHAR -** WEECHAT_HDATA_INTEGER -** WEECHAT_HDATA_LONG -** WEECHAT_HDATA_STRING -** WEECHAT_HDATA_SHARED_STRING -** WEECHAT_HDATA_POINTER -** WEECHAT_HDATA_TIME -** WEECHAT_HDATA_HASHTABLE -** WEECHAT_HDATA_OTHER +** _WEECHAT_HDATA_CHAR_ +** _WEECHAT_HDATA_INTEGER_ +** _WEECHAT_HDATA_LONG_ +** _WEECHAT_HDATA_STRING_ +** _WEECHAT_HDATA_SHARED_STRING_ (_WeeChat ≥ 0.4.3_) +** _WEECHAT_HDATA_POINTER_ +** _WEECHAT_HDATA_TIME_ +** _WEECHAT_HDATA_HASHTABLE_ (_WeeChat ≥ 0.3.7_) +** _WEECHAT_HDATA_OTHER_ * _update_allowed_ : 1 si la mise à jour de la variable est autorisée, sinon 0 _(WeeChat ≥ 0.3.9)_ * _array_size_ : non NULL seulement si la variable est un tableau, et peut @@ -16793,6 +16793,35 @@ Paramètres : * _hdata_name_ : nom d'un hdata (si c'est un pointeur vers une structure qui a un hdata) +Avec WeeChat ≥ 3.4, le paramètre _array_size_ peut être préfixé par `*,` pour +un pointeur vers un tableau alloué dynamiquement (sans ce préfixe, le tableau +est considéré statique). + +Exemples de variables avec la taille de tableau correspondante (_WeeChat ≥ 3.4_) : + +[width="100%",cols="3,3m,2,7",options="header"] +|=== +| Déclaration de variable en C | Type Hdata | Taille de tableau | Description + +| `+int *numbers;+` | WEECHAT_HDATA_INTEGER | `+*,2+` | + Tableau alloué de 2 entiers. + +| `+int *numbers;+` | WEECHAT_HDATA_INTEGER | `+*,array_size+` | + Tableau alloué d'entiers, la taille est stockée dans une autre variable + nommée "array_size". + +| `+int numbers[3];+` | WEECHAT_HDATA_INTEGER | `+3+` | + Tableau statique de 3 entiers. + +| `+char **words;+` | WEECHAT_HDATA_STRING | `+*,*+` | + Tableau alloué de chaînes, taille dynamique (un pointeur NULL doit être + présent après le dernier mot). + +| `+char **words;+` | WEECHAT_HDATA_STRING | `+*,count_words+` | + Tableau alloué de chaînes, la taille est stockée dans une autre variable + nommée "count_words". +|=== + Exemple en C : [source,C] @@ -16801,6 +16830,7 @@ struct t_myplugin_list { char *name; struct t_gui_buffer *buffer; + int numbers[3]; int tags_count; char **tags_array; char **string_split; @@ -16813,9 +16843,10 @@ struct t_myplugin_list struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next"); weechat_hdata_new_var (hdata, "name", offsetof (struct t_myplugin_list, name), WEECHAT_HDATA_STRING, 0, NULL, NULL); weechat_hdata_new_var (hdata, "buffer", offsetof (struct t_myplugin_list, buffer), WEECHAT_HDATA_POINTER, 0, NULL, NULL); +weechat_hdata_new_var (hdata, "numbers", offsetof (struct t_myplugin_list, numbers), WEECHAT_HDATA_INTEGER, 0, "3", NULL); weechat_hdata_new_var (hdata, "tags_count", offsetof (struct t_myplugin_list, tags_count), WEECHAT_HDATA_INTEGER, 0, NULL, NULL); -weechat_hdata_new_var (hdata, "tags_array", offsetof (struct t_myplugin_list, tags_array), WEECHAT_HDATA_STRING, 0, "tags_count", NULL); -weechat_hdata_new_var (hdata, "string_split", offsetof (struct t_myplugin_list, string_split), WEECHAT_HDATA_STRING, 0, "*", NULL); +weechat_hdata_new_var (hdata, "tags_array", offsetof (struct t_myplugin_list, tags_array), WEECHAT_HDATA_STRING, 0, "*,tags_count", NULL); +weechat_hdata_new_var (hdata, "string_split", offsetof (struct t_myplugin_list, string_split), WEECHAT_HDATA_STRING, 0, "*,*", NULL); weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); ---- @@ -16826,9 +16857,10 @@ La macro "WEECHAT_HDATA_VAR" peut être utilisée pour raccourcir le code : ---- WEECHAT_HDATA_VAR(struct t_myplugin_list, name, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, buffer, POINTER, 0, NULL, NULL); +WEECHAT_HDATA_VAR(struct t_myplugin_list, numbers, INTEGER, 0, "3", NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_count, INTEGER, 0, NULL, NULL); -WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_array, STRING, 0, "tags_count", NULL); -WEECHAT_HDATA_VAR(struct t_myplugin_list, string_split, STRING, 0, "*", NULL); +WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_array, STRING, 0, "*,tags_count", NULL); +WEECHAT_HDATA_VAR(struct t_myplugin_list, string_split, STRING, 0, "*,*", NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, prev, POINTER, 0, NULL, "myplugin_list"); WEECHAT_HDATA_VAR(struct t_myplugin_list, next, POINTER, 0, NULL, "myplugin_list"); ---- diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index 0e1159767..a2273eac5 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -17078,7 +17078,7 @@ Questa funzione non è disponibile nelle API per lo scripting. ==== hdata_new_var // TRANSLATION MISSING -_WeeChat ≥ 0.3.6, updated in 0.3.9_ +_WeeChat ≥ 0.3.6, updated in 0.3.7, 0.3.9, 0.4.3 and 3.4_ Crea una nuova variabile in hdata. @@ -17096,15 +17096,15 @@ Argomenti: * _name_: nome della variabile * _offset_: offset della variabile nella struttura * _type_: tipo variabile, una di: -** WEECHAT_HDATA_CHAR -** WEECHAT_HDATA_INTEGER -** WEECHAT_HDATA_LONG -** WEECHAT_HDATA_STRING -** WEECHAT_HDATA_SHARED_STRING -** WEECHAT_HDATA_POINTER -** WEECHAT_HDATA_TIME -** WEECHAT_HDATA_HASHTABLE -** WEECHAT_HDATA_OTHER +** _WEECHAT_HDATA_CHAR_ +** _WEECHAT_HDATA_INTEGER_ +** _WEECHAT_HDATA_LONG_ +** _WEECHAT_HDATA_STRING_ +** _WEECHAT_HDATA_SHARED_STRING_ (_WeeChat ≥ 0.4.3_) +** _WEECHAT_HDATA_POINTER_ +** _WEECHAT_HDATA_TIME_ +** _WEECHAT_HDATA_HASHTABLE_ (_WeeChat ≥ 0.3.7_) +** _WEECHAT_HDATA_OTHER_ // TRANSLATION MISSING * _update_allowed_: 1 if update of variable is allowed, otherwise 0 _(WeeChat ≥ 0.3.9)_ @@ -17118,6 +17118,38 @@ Argomenti: the first NULL is found (only for type string, pointer or hashtable) * _hdata_name_: nome di un hdata (se è un puntatore ad una struttura con dati) +// TRANSLATION MISSING +With WeeChat ≥ 3.4, the _array_size_ parameter can be prefixed with `*,` for +pointer to dynamically allocated array (without this prefix, the array is +considered static). + +// TRANSLATION MISSING +Examples of variables and the corresponding array size (_WeeChat ≥ 3.4_): + +// TRANSLATION MISSING +[width="100%",cols="3,3m,2,7",options="header"] +|=== +| Variable declaration in C | Hdata type | Array size | Description + +| `+int *numbers;+` | WEECHAT_HDATA_INTEGER | `+*,2+` | + Allocated array of 2 integers. + +| `+int *numbers;+` | WEECHAT_HDATA_INTEGER | `+*,array_size+` | + Allocated array of integers, the size is stored in another variable called + "array_size". + +| `+int numbers[3];+` | WEECHAT_HDATA_INTEGER | `+3+` | + Static array of 3 integers. + +| `+char **words;+` | WEECHAT_HDATA_STRING | `+*,*+` | + Allocated array of strings, dynamic size (NULL pointer must be present after + last word). + +| `+char **words;+` | WEECHAT_HDATA_STRING | `+*,count_words+` | + Allocated array of strings, the size is stored in another variable called + "count_words". +|=== + Esempio in C: [source,C] @@ -17126,6 +17158,7 @@ struct t_myplugin_list { char *name; struct t_gui_buffer *buffer; + int numbers[3]; int tags_count; char **tags_array; char **string_split; @@ -17138,9 +17171,10 @@ struct t_myplugin_list struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next"); weechat_hdata_new_var (hdata, "name", offsetof (struct t_myplugin_list, name), WEECHAT_HDATA_STRING, 0, NULL, NULL); weechat_hdata_new_var (hdata, "buffer", offsetof (struct t_myplugin_list, buffer), WEECHAT_HDATA_POINTER, 0, NULL, NULL); +weechat_hdata_new_var (hdata, "numbers", offsetof (struct t_myplugin_list, numbers), WEECHAT_HDATA_INTEGER, 0, "3", NULL); weechat_hdata_new_var (hdata, "tags_count", offsetof (struct t_myplugin_list, tags_count), WEECHAT_HDATA_INTEGER, 0, NULL, NULL); -weechat_hdata_new_var (hdata, "tags_array", offsetof (struct t_myplugin_list, tags_array), WEECHAT_HDATA_STRING, 0, "tags_count", NULL); -weechat_hdata_new_var (hdata, "string_split", offsetof (struct t_myplugin_list, string_split), WEECHAT_HDATA_STRING, 0, "*", NULL); +weechat_hdata_new_var (hdata, "tags_array", offsetof (struct t_myplugin_list, tags_array), WEECHAT_HDATA_STRING, 0, "*,tags_count", NULL); +weechat_hdata_new_var (hdata, "string_split", offsetof (struct t_myplugin_list, string_split), WEECHAT_HDATA_STRING, 0, "*,*", NULL); weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); ---- @@ -17151,9 +17185,10 @@ La macro "WEECHAT_HDATA_VAR" può essere usata per accorciare il codice: ---- WEECHAT_HDATA_VAR(struct t_myplugin_list, name, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, buffer, POINTER, 0, NULL, NULL); +WEECHAT_HDATA_VAR(struct t_myplugin_list, numbers, INTEGER, 0, "3", NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_count, INTEGER, 0, NULL, NULL); -WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_array, STRING, 0, "tags_count", NULL); -WEECHAT_HDATA_VAR(struct t_myplugin_list, string_split, STRING, 0, "*", NULL); +WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_array, STRING, 0, "*,tags_count", NULL); +WEECHAT_HDATA_VAR(struct t_myplugin_list, string_split, STRING, 0, "*,*", NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, prev, POINTER, 0, NULL, "myplugin_list"); WEECHAT_HDATA_VAR(struct t_myplugin_list, next, POINTER, 0, NULL, "myplugin_list"); ---- diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index 3b33360fc..d50b93dcc 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -16468,7 +16468,8 @@ struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next", 0, 0 ==== hdata_new_var -_WeeChat バージョン 0.3.6 以上で利用可、バージョン 0.3.9 で更新。_ +// TRANSLATION MISSING +_WeeChat ≥ 0.3.6, updated in 0.3.7, 0.3.9, 0.4.3 and 3.4._ hdata に新しい変数を作成。 @@ -16486,15 +16487,15 @@ void weechat_hdata_new_var (struct t_hdata *hdata, const char *name, int offset, * _name_: 変数名 * _offset_: 構造体における変数のオフセット * _type_: 変数型、以下の 1 つ: -** WEECHAT_HDATA_CHAR -** WEECHAT_HDATA_INTEGER -** WEECHAT_HDATA_LONG -** WEECHAT_HDATA_STRING -** WEECHAT_HDATA_SHARED_STRING -** WEECHAT_HDATA_POINTER -** WEECHAT_HDATA_TIME -** WEECHAT_HDATA_HASHTABLE -** WEECHAT_HDATA_OTHER +** _WEECHAT_HDATA_CHAR_ +** _WEECHAT_HDATA_INTEGER_ +** _WEECHAT_HDATA_LONG_ +** _WEECHAT_HDATA_STRING_ +** _WEECHAT_HDATA_SHARED_STRING_ (_WeeChat ≥ 0.4.3_) +** _WEECHAT_HDATA_POINTER_ +** _WEECHAT_HDATA_TIME_ +** _WEECHAT_HDATA_HASHTABLE_ (_WeeChat ≥ 0.3.7_) +** _WEECHAT_HDATA_OTHER_ * _update_allowed_: 変数の更新を許可する場合は 1、禁止する場合は 0 _(WeeChat バージョン 0.3.9 以上で利用可)_ * _array_size_: 配列でない場合は必ず NULL、配列の場合の値は: @@ -16506,6 +16507,38 @@ void weechat_hdata_new_var (struct t_hdata *hdata, const char *name, int offset, (文字列、ポインタ、ハッシュテーブル型以外では使えません) * _hdata_name_: hdata の名前 (変数が hdata を含む構造体へのポインタの場合) +// TRANSLATION MISSING +With WeeChat ≥ 3.4, the _array_size_ parameter can be prefixed with `*,` for +pointer to dynamically allocated array (without this prefix, the array is +considered static). + +// TRANSLATION MISSING +Examples of variables and the corresponding array size (_WeeChat ≥ 3.4_): + +// TRANSLATION MISSING +[width="100%",cols="3,3m,2,7",options="header"] +|=== +| Variable declaration in C | Hdata type | Array size | Description + +| `+int *numbers;+` | WEECHAT_HDATA_INTEGER | `+*,2+` | + Allocated array of 2 integers. + +| `+int *numbers;+` | WEECHAT_HDATA_INTEGER | `+*,array_size+` | + Allocated array of integers, the size is stored in another variable called + "array_size". + +| `+int numbers[3];+` | WEECHAT_HDATA_INTEGER | `+3+` | + Static array of 3 integers. + +| `+char **words;+` | WEECHAT_HDATA_STRING | `+*,*+` | + Allocated array of strings, dynamic size (NULL pointer must be present after + last word). + +| `+char **words;+` | WEECHAT_HDATA_STRING | `+*,count_words+` | + Allocated array of strings, the size is stored in another variable called + "count_words". +|=== + C 言語での使用例: [source,C] @@ -16514,6 +16547,7 @@ struct t_myplugin_list { char *name; struct t_gui_buffer *buffer; + int numbers[3]; int tags_count; char **tags_array; char **string_split; @@ -16526,9 +16560,10 @@ struct t_myplugin_list struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next"); weechat_hdata_new_var (hdata, "name", offsetof (struct t_myplugin_list, name), WEECHAT_HDATA_STRING, 0, NULL, NULL); weechat_hdata_new_var (hdata, "buffer", offsetof (struct t_myplugin_list, buffer), WEECHAT_HDATA_POINTER, 0, NULL, NULL); +weechat_hdata_new_var (hdata, "numbers", offsetof (struct t_myplugin_list, numbers), WEECHAT_HDATA_INTEGER, 0, "3", NULL); weechat_hdata_new_var (hdata, "tags_count", offsetof (struct t_myplugin_list, tags_count), WEECHAT_HDATA_INTEGER, 0, NULL, NULL); -weechat_hdata_new_var (hdata, "tags_array", offsetof (struct t_myplugin_list, tags_array), WEECHAT_HDATA_STRING, 0, "tags_count", NULL); -weechat_hdata_new_var (hdata, "string_split", offsetof (struct t_myplugin_list, string_split), WEECHAT_HDATA_STRING, 0, "*", NULL); +weechat_hdata_new_var (hdata, "tags_array", offsetof (struct t_myplugin_list, tags_array), WEECHAT_HDATA_STRING, 0, "*,tags_count", NULL); +weechat_hdata_new_var (hdata, "string_split", offsetof (struct t_myplugin_list, string_split), WEECHAT_HDATA_STRING, 0, "*,*", NULL); weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); ---- @@ -16539,9 +16574,10 @@ weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), W ---- WEECHAT_HDATA_VAR(struct t_myplugin_list, name, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, buffer, POINTER, 0, NULL, NULL); +WEECHAT_HDATA_VAR(struct t_myplugin_list, numbers, INTEGER, 0, "3", NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_count, INTEGER, 0, NULL, NULL); -WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_array, STRING, 0, "tags_count", NULL); -WEECHAT_HDATA_VAR(struct t_myplugin_list, string_split, STRING, 0, "*", NULL); +WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_array, STRING, 0, "*,tags_count", NULL); +WEECHAT_HDATA_VAR(struct t_myplugin_list, string_split, STRING, 0, "*,*", NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, prev, POINTER, 0, NULL, "myplugin_list"); WEECHAT_HDATA_VAR(struct t_myplugin_list, next, POINTER, 0, NULL, "myplugin_list"); ---- diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc index 98cc86171..85b5ceba2 100644 --- a/doc/sr/weechat_plugin_api.sr.adoc +++ b/doc/sr/weechat_plugin_api.sr.adoc @@ -15857,7 +15857,7 @@ struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next", 0, 0 ==== hdata_new_var -_WeeChat ≥ 0.3.6, ажурирано у верзији 0.3.9._ +_WeeChat ≥ 0.3.6, ажурирано у верзијама 0.3.7, 0.3.9, 0.4.3 и 3.4._ Креира нову променљиву у hdata. @@ -15875,15 +15875,15 @@ void weechat_hdata_new_var (struct t_hdata *hdata, const char *name, int offset, * _name_: име променљиве * _offset_: померај променљиве од почетка структуре * _type_: тип променљиве, једно од: -** WEECHAT_HDATA_CHAR -** WEECHAT_HDATA_INTEGER -** WEECHAT_HDATA_LONG -** WEECHAT_HDATA_STRING -** WEECHAT_HDATA_SHARED_STRING -** WEECHAT_HDATA_POINTER -** WEECHAT_HDATA_TIME -** WEECHAT_HDATA_HASHTABLE -** WEECHAT_HDATA_OTHER +** _WEECHAT_HDATA_CHAR_ +** _WEECHAT_HDATA_INTEGER_ +** _WEECHAT_HDATA_LONG_ +** _WEECHAT_HDATA_STRING_ +** _WEECHAT_HDATA_SHARED_STRING_ (_WeeChat ≥ 0.4.3_) +** _WEECHAT_HDATA_POINTER_ +** _WEECHAT_HDATA_TIME_ +** _WEECHAT_HDATA_HASHTABLE_ (_WeeChat ≥ 0.3.7_) +** _WEECHAT_HDATA_OTHER_ * _update_allowed_: 1 ако се дозвољава ажурирање променљиве, у супротном 0 _(WeeChat ≥ 0.3.9)_ * _array_size_: није NULL само ако је променљива низ, и може бити: _(WeeChat ≥ 0.3.9)_ ** име променљиве у hdata: ова променљива ће се користити као величина низа (динамичка величина низа) @@ -15891,6 +15891,38 @@ void weechat_hdata_new_var (struct t_hdata *hdata, const char *name, int offset, ** _*_: аутоматска величина: величина низа се израчунава гледањем у вредности, када се наиђе на прво NULL (само за тип стринг, показивач или хеш табелу) * _hdata_name_: име hdata (ако је то показивач на структуру са hdata) +// TRANSLATION MISSING +With WeeChat ≥ 3.4, the _array_size_ parameter can be prefixed with `*,` for +pointer to dynamically allocated array (without this prefix, the array is +considered static). + +// TRANSLATION MISSING +Examples of variables and the corresponding array size (_WeeChat ≥ 3.4_): + +// TRANSLATION MISSING +[width="100%",cols="3,3m,2,7",options="header"] +|=== +| Variable declaration in C | Hdata type | Array size | Description + +| `+int *numbers;+` | WEECHAT_HDATA_INTEGER | `+*,2+` | + Allocated array of 2 integers. + +| `+int *numbers;+` | WEECHAT_HDATA_INTEGER | `+*,array_size+` | + Allocated array of integers, the size is stored in another variable called + "array_size". + +| `+int numbers[3];+` | WEECHAT_HDATA_INTEGER | `+3+` | + Static array of 3 integers. + +| `+char **words;+` | WEECHAT_HDATA_STRING | `+*,*+` | + Allocated array of strings, dynamic size (NULL pointer must be present after + last word). + +| `+char **words;+` | WEECHAT_HDATA_STRING | `+*,count_words+` | + Allocated array of strings, the size is stored in another variable called + "count_words". +|=== + C пример: [source, C] @@ -15899,6 +15931,7 @@ struct t_myplugin_list { char *name; struct t_gui_buffer *buffer; + int numbers[3]; int tags_count; char **tags_array; char **string_split; @@ -15911,9 +15944,10 @@ struct t_myplugin_list struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next"); weechat_hdata_new_var (hdata, "name", offsetof (struct t_myplugin_list, name), WEECHAT_HDATA_STRING, 0, NULL, NULL); weechat_hdata_new_var (hdata, "buffer", offsetof (struct t_myplugin_list, buffer), WEECHAT_HDATA_POINTER, 0, NULL, NULL); +weechat_hdata_new_var (hdata, "numbers", offsetof (struct t_myplugin_list, numbers), WEECHAT_HDATA_INTEGER, 0, "3", NULL); weechat_hdata_new_var (hdata, "tags_count", offsetof (struct t_myplugin_list, tags_count), WEECHAT_HDATA_INTEGER, 0, NULL, NULL); -weechat_hdata_new_var (hdata, "tags_array", offsetof (struct t_myplugin_list, tags_array), WEECHAT_HDATA_STRING, 0, "tags_count", NULL); -weechat_hdata_new_var (hdata, "string_split", offsetof (struct t_myplugin_list, string_split), WEECHAT_HDATA_STRING, 0, "*", NULL); +weechat_hdata_new_var (hdata, "tags_array", offsetof (struct t_myplugin_list, tags_array), WEECHAT_HDATA_STRING, 0, "*,tags_count", NULL); +weechat_hdata_new_var (hdata, "string_split", offsetof (struct t_myplugin_list, string_split), WEECHAT_HDATA_STRING, 0, "*,*", NULL); weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); ---- @@ -15924,9 +15958,10 @@ weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), W ---- WEECHAT_HDATA_VAR(struct t_myplugin_list, name, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, buffer, POINTER, 0, NULL, NULL); +WEECHAT_HDATA_VAR(struct t_myplugin_list, numbers, INTEGER, 0, "3", NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_count, INTEGER, 0, NULL, NULL); -WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_array, STRING, 0, "tags_count", NULL); -WEECHAT_HDATA_VAR(struct t_myplugin_list, string_split, STRING, 0, "*", NULL); +WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_array, STRING, 0, "*,tags_count", NULL); +WEECHAT_HDATA_VAR(struct t_myplugin_list, string_split, STRING, 0, "*,*", NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, prev, POINTER, 0, NULL, "myplugin_list"); WEECHAT_HDATA_VAR(struct t_myplugin_list, next, POINTER, 0, NULL, "myplugin_list"); ---- diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c index 27050c9ed..a5155d907 100644 --- a/src/core/wee-config-file.c +++ b/src/core/wee-config-file.c @@ -3310,7 +3310,7 @@ config_file_hdata_config_option_cb (const void *pointer, void *data, HDATA_VAR(struct t_config_option, parent_name, STRING, 0, NULL, NULL); HDATA_VAR(struct t_config_option, type, INTEGER, 0, NULL, NULL); HDATA_VAR(struct t_config_option, description, STRING, 0, NULL, NULL); - HDATA_VAR(struct t_config_option, string_values, STRING, 0, "*", NULL); + HDATA_VAR(struct t_config_option, string_values, STRING, 0, "*,*", NULL); HDATA_VAR(struct t_config_option, min, INTEGER, 0, NULL, NULL); HDATA_VAR(struct t_config_option, max, INTEGER, 0, NULL, NULL); HDATA_VAR(struct t_config_option, default_value, POINTER, 0, NULL, NULL); diff --git a/src/core/wee-hdata.c b/src/core/wee-hdata.c index d36100dbf..d1b800473 100644 --- a/src/core/wee-hdata.c +++ b/src/core/wee-hdata.c @@ -146,6 +146,7 @@ hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type, const char *hdata_name) { struct t_hdata_var *var; + const char *ptr_array_size; if (!hdata || !name) return; @@ -156,8 +157,20 @@ hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type, var->offset = offset; var->type = type; var->update_allowed = update_allowed; - var->array_size = (array_size && array_size[0]) ? strdup (array_size) : NULL; - var->hdata_name = (hdata_name && hdata_name[0]) ? strdup (hdata_name) : NULL; + ptr_array_size = array_size; + if (ptr_array_size && (strncmp (ptr_array_size, "*,", 2) == 0)) + { + var->array_pointer = 1; + ptr_array_size += 2; + } + else + { + var->array_pointer = 0; + } + var->array_size = (ptr_array_size && ptr_array_size[0]) ? + strdup (ptr_array_size) : NULL; + var->hdata_name = (hdata_name && hdata_name[0]) ? + strdup (hdata_name) : NULL; hashtable_set (hdata->hash_var, name, var); } } @@ -704,9 +717,16 @@ hdata_char (struct t_hdata *hdata, void *pointer, const char *name) if (var && (var->offset >= 0)) { if (var->array_size && (index >= 0)) - return (*((char **)(pointer + var->offset)))[index]; + { + if (var->array_pointer) + return (*((char **)(pointer + var->offset)))[index]; + else + return ((char *)(pointer + var->offset))[index]; + } else + { return *((char *)(pointer + var->offset)); + } } return '\0'; @@ -731,9 +751,16 @@ hdata_integer (struct t_hdata *hdata, void *pointer, const char *name) if (var && (var->offset >= 0)) { if (var->array_size && (index >= 0)) - return ((int *)(pointer + var->offset))[index]; + { + if (var->array_pointer) + return (*((int **)(pointer + var->offset)))[index]; + else + return ((int *)(pointer + var->offset))[index]; + } else + { return *((int *)(pointer + var->offset)); + } } return 0; @@ -758,9 +785,16 @@ hdata_long (struct t_hdata *hdata, void *pointer, const char *name) if (var && (var->offset >= 0)) { if (var->array_size && (index >= 0)) - return ((long *)(pointer + var->offset))[index]; + { + if (var->array_pointer) + return (*((long **)(pointer + var->offset)))[index]; + else + return ((long *)(pointer + var->offset))[index]; + } else + { return *((long *)(pointer + var->offset)); + } } return 0; @@ -785,9 +819,19 @@ hdata_string (struct t_hdata *hdata, void *pointer, const char *name) if (var && (var->offset >= 0)) { if (var->array_size && (index >= 0)) - return (*((char ***)(pointer + var->offset)))[index]; + { + if (var->array_pointer) + return (*((char ***)(pointer + var->offset)))[index]; + else + { + /* we can not index a static array of strings */ + return NULL; + } + } else + { return *((char **)(pointer + var->offset)); + } } return NULL; @@ -812,9 +856,16 @@ hdata_pointer (struct t_hdata *hdata, void *pointer, const char *name) if (var && (var->offset >= 0)) { if (var->array_size && (index >= 0)) - return (*((void ***)(pointer + var->offset)))[index]; + { + if (var->array_pointer) + return (*((void ***)(pointer + var->offset)))[index]; + else + return ((void **)(pointer + var->offset))[index]; + } else + { return *((void **)(pointer + var->offset)); + } } return NULL; @@ -839,9 +890,16 @@ hdata_time (struct t_hdata *hdata, void *pointer, const char *name) if (var && (var->offset >= 0)) { if (var->array_size && (index >= 0)) - return ((time_t *)(pointer + var->offset))[index]; + { + if (var->array_pointer) + return (*((time_t **)(pointer + var->offset)))[index]; + else + return ((time_t *)(pointer + var->offset))[index]; + } else + { return *((time_t *)(pointer + var->offset)); + } } return 0; @@ -866,9 +924,16 @@ hdata_hashtable (struct t_hdata *hdata, void *pointer, const char *name) if (var && (var->offset >= 0)) { if (var->array_size && (index >= 0)) - return (*((struct t_hashtable ***)(pointer + var->offset)))[index]; + { + if (var->array_pointer) + return (*((struct t_hashtable ***)(pointer + var->offset)))[index]; + else + return ((struct t_hashtable **)(pointer + var->offset))[index]; + } else + { return *((struct t_hashtable **)(pointer + var->offset)); + } } return NULL; diff --git a/src/core/wee-hdata.h b/src/core/wee-hdata.h index 5f4c3789f..24eb6eb8a 100644 --- a/src/core/wee-hdata.h +++ b/src/core/wee-hdata.h @@ -36,6 +36,8 @@ struct t_hdata_var char type; /* type */ char update_allowed; /* update allowed? */ char *array_size; /* array size */ + char array_pointer; /* pointer to dynamically allocated */ + /* array? */ char *hdata_name; /* hdata name */ }; diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 411d48f4d..cbaecf811 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -4363,10 +4363,10 @@ gui_buffer_hdata_buffer_cb (const void *pointer, void *data, HDATA_VAR(struct t_gui_buffer, highlight_regex_compiled, POINTER, 0, NULL, NULL); HDATA_VAR(struct t_gui_buffer, highlight_tags_restrict, STRING, 0, NULL, NULL); HDATA_VAR(struct t_gui_buffer, highlight_tags_restrict_count, INTEGER, 0, NULL, NULL); - HDATA_VAR(struct t_gui_buffer, highlight_tags_restrict_array, POINTER, 0, "highlight_tags_restrict_count", NULL); + HDATA_VAR(struct t_gui_buffer, highlight_tags_restrict_array, POINTER, 0, "*,highlight_tags_restrict_count", NULL); HDATA_VAR(struct t_gui_buffer, highlight_tags, STRING, 0, NULL, NULL); HDATA_VAR(struct t_gui_buffer, highlight_tags_count, INTEGER, 0, NULL, NULL); - HDATA_VAR(struct t_gui_buffer, highlight_tags_array, POINTER, 0, "highlight_tags_count", NULL); + HDATA_VAR(struct t_gui_buffer, highlight_tags_array, POINTER, 0, "*,highlight_tags_count", NULL); HDATA_VAR(struct t_gui_buffer, hotlist, POINTER, 0, NULL, "hotlist"); HDATA_VAR(struct t_gui_buffer, hotlist_max_level_nicks, HASHTABLE, 0, NULL, NULL); HDATA_VAR(struct t_gui_buffer, keys, POINTER, 0, NULL, "key"); diff --git a/src/gui/gui-filter.c b/src/gui/gui-filter.c index d09bbb22f..9bcf4f561 100644 --- a/src/gui/gui-filter.c +++ b/src/gui/gui-filter.c @@ -544,7 +544,7 @@ gui_filter_hdata_filter_cb (const void *pointer, void *data, HDATA_VAR(struct t_gui_filter, buffers, POINTER, 0, NULL, NULL); HDATA_VAR(struct t_gui_filter, tags, STRING, 0, NULL, NULL); HDATA_VAR(struct t_gui_filter, tags_count, INTEGER, 0, NULL, NULL); - HDATA_VAR(struct t_gui_filter, tags_array, POINTER, 0, "tags_count", NULL); + HDATA_VAR(struct t_gui_filter, tags_array, POINTER, 0, "*,tags_count", NULL); HDATA_VAR(struct t_gui_filter, regex, STRING, 0, NULL, NULL); HDATA_VAR(struct t_gui_filter, regex_prefix, POINTER, 0, NULL, NULL); HDATA_VAR(struct t_gui_filter, regex_message, POINTER, 0, NULL, NULL); diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c index a30e574bc..65bb449f2 100644 --- a/src/gui/gui-line.c +++ b/src/gui/gui-line.c @@ -2059,7 +2059,7 @@ gui_line_hdata_line_data_cb (const void *pointer, void *data, HDATA_VAR(struct t_gui_line_data, date_printed, TIME, 1, NULL, NULL); HDATA_VAR(struct t_gui_line_data, str_time, STRING, 0, NULL, NULL); HDATA_VAR(struct t_gui_line_data, tags_count, INTEGER, 0, NULL, NULL); - HDATA_VAR(struct t_gui_line_data, tags_array, SHARED_STRING, 1, "tags_count", NULL); + HDATA_VAR(struct t_gui_line_data, tags_array, SHARED_STRING, 1, "*,tags_count", NULL); HDATA_VAR(struct t_gui_line_data, displayed, CHAR, 0, NULL, NULL); HDATA_VAR(struct t_gui_line_data, notify_level, CHAR, 0, NULL, NULL); HDATA_VAR(struct t_gui_line_data, highlight, CHAR, 0, NULL, NULL); diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index f396c1c9b..c136171e2 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -6072,9 +6072,9 @@ irc_server_hdata_server_cb (const void *pointer, void *data, WEECHAT_HDATA_VAR(struct t_irc_server, reloaded_from_config, INTEGER, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, addresses_eval, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, addresses_count, INTEGER, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_irc_server, addresses_array, STRING, 0, "addresses_count", NULL); - WEECHAT_HDATA_VAR(struct t_irc_server, ports_array, INTEGER, 0, "addresses_count", NULL); - WEECHAT_HDATA_VAR(struct t_irc_server, retry_array, INTEGER, 0, "addresses_count", NULL); + WEECHAT_HDATA_VAR(struct t_irc_server, addresses_array, STRING, 0, "*,addresses_count", NULL); + WEECHAT_HDATA_VAR(struct t_irc_server, ports_array, INTEGER, 0, "*,addresses_count", NULL); + WEECHAT_HDATA_VAR(struct t_irc_server, retry_array, INTEGER, 0, "*,addresses_count", NULL); WEECHAT_HDATA_VAR(struct t_irc_server, index_current_address, INTEGER, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, current_address, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, current_ip, STRING, 0, NULL, NULL); @@ -6099,7 +6099,7 @@ irc_server_hdata_server_cb (const void *pointer, void *data, WEECHAT_HDATA_VAR(struct t_irc_server, tls_cert_key, OTHER, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, unterminated_message, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, nicks_count, INTEGER, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_irc_server, nicks_array, STRING, 0, "nicks_count", NULL); + WEECHAT_HDATA_VAR(struct t_irc_server, nicks_array, STRING, 0, "*,nicks_count", NULL); WEECHAT_HDATA_VAR(struct t_irc_server, nick_first_tried, INTEGER, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, nick_alternate_number, INTEGER, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, nick, STRING, 0, NULL, NULL); @@ -6123,7 +6123,7 @@ irc_server_hdata_server_cb (const void *pointer, void *data, WEECHAT_HDATA_VAR(struct t_irc_server, monitor_time, TIME, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, clienttagdeny, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, clienttagdeny_count, INTEGER, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_irc_server, clienttagdeny_array, STRING, 0, "clienttagdeny_count", NULL); + WEECHAT_HDATA_VAR(struct t_irc_server, clienttagdeny_array, STRING, 0, "*,clienttagdeny_count", NULL); WEECHAT_HDATA_VAR(struct t_irc_server, typing_allowed, INTEGER, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, reconnect_delay, INTEGER, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, reconnect_start, TIME, 0, NULL, NULL); |