1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 12:26:40 +02:00

api: change type of parameter "pos_option_name" to "const char **" in function config_search_with_string

This commit is contained in:
Sébastien Helleu
2026-06-14 22:55:51 +02:00
parent a8067751eb
commit cf702d541f
12 changed files with 29 additions and 28 deletions
+1
View File
@@ -12,6 +12,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
- core: add condition on connected relay api clients in default value of option weechat.look.hotlist_add_conditions
- core: add `/mute` in default command for key `Alt`+`=` (toggle filters)
- api: change type of parameter "pos_option_name" to "const char **" in function config_search_with_string
- relay/api: add field "last_read_line_id" in GET /api/buffers
### Added
+2 -2
View File
@@ -7709,7 +7709,7 @@ void weechat_config_search_with_string (const char *option_name,
struct t_config_file **config_file,
struct t_config_section **section,
struct t_config_option **option,
char **pos_option_name);
const char **pos_option_name);
----
Arguments:
@@ -7731,7 +7731,7 @@ C example:
struct t_config_file *ptr_config_file;
struct t_config_section *ptr_section;
struct t_config_option *ptr_option;
char *option_name;
const char *option_name;
weechat_config_search_with_string ("file.section.option",
&ptr_config_file,
+2 -2
View File
@@ -7838,7 +7838,7 @@ void weechat_config_search_with_string (const char *option_name,
struct t_config_file **config_file,
struct t_config_section **section,
struct t_config_option **option,
char **pos_option_name);
const char **pos_option_name);
----
Paramètres :
@@ -7861,7 +7861,7 @@ Exemple en C :
struct t_config_file *ptr_config_file;
struct t_config_section *ptr_section;
struct t_config_option *ptr_option;
char *option_name;
const char *option_name;
weechat_config_search_with_string ("fichier.section.option",
&ptr_config_file,
+2 -2
View File
@@ -8011,7 +8011,7 @@ void weechat_config_search_with_string (const char *option_name,
struct t_config_file **config_file,
struct t_config_section **section,
struct t_config_option **option,
char **pos_option_name);
const char **pos_option_name);
----
Argomenti:
@@ -8034,7 +8034,7 @@ Esempio in C:
struct t_config_file *ptr_config_file;
struct t_config_section *ptr_section;
struct t_config_option *ptr_option;
char *option_name;
const char *option_name;
weechat_config_search_with_string ("file.section.option",
&ptr_config_file,
+2 -2
View File
@@ -7816,7 +7816,7 @@ void weechat_config_search_with_string (const char *option_name,
struct t_config_file **config_file,
struct t_config_section **section,
struct t_config_option **option,
char **pos_option_name);
const char **pos_option_name);
----
引数:
@@ -7838,7 +7838,7 @@ C 言語での使用例:
struct t_config_file *ptr_config_file;
struct t_config_section *ptr_section;
struct t_config_option *ptr_option;
char *option_name;
const char *option_name;
weechat_config_search_with_string ("file.section.option",
&ptr_config_file,
+2 -2
View File
@@ -7492,7 +7492,7 @@ void weechat_config_search_with_string (const char *option_name,
struct t_config_file **config_file,
struct t_config_section **section,
struct t_config_option **option,
char **pos_option_name);
const char **pos_option_name);
----
Аргументи:
@@ -7510,7 +7510,7 @@ C пример:
struct t_config_file *ptr_config_file;
struct t_config_section *ptr_section;
struct t_config_option *ptr_option;
char *option_name;
const char *option_name;
weechat_config_search_with_string ("file.section.option",
&ptr_config_file,
+4 -3
View File
@@ -1095,12 +1095,13 @@ config_file_search_with_string (const char *option_name,
struct t_config_file **config_file,
struct t_config_section **section,
struct t_config_option **option,
char **pos_option_name)
const char **pos_option_name)
{
struct t_config_file *ptr_config;
struct t_config_section *ptr_section;
struct t_config_option *ptr_option;
char *file_name, *pos_section, *section_name, *pos_option;
const char *pos_section, *pos_option;
char *file_name, *section_name;
if (config_file)
*config_file = NULL;
@@ -2553,7 +2554,7 @@ config_file_option_set_with_string (const char *option_name, const char *value)
struct t_config_file *ptr_config;
struct t_config_section *ptr_section;
struct t_config_option *ptr_option;
char *pos_option;
const char *pos_option;
rc = WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND;
+1 -1
View File
@@ -286,7 +286,7 @@ extern void config_file_search_with_string (const char *option_name,
struct t_config_file **config_file,
struct t_config_section **section,
struct t_config_option **option,
char **pos_option_name);
const char **pos_option_name);
extern int config_file_string_to_boolean (const char *text);
extern int config_file_option_reset (struct t_config_option *option,
int run_callback);
+9 -9
View File
@@ -1880,9 +1880,9 @@ gui_bar_item_buffer_nicklist_cb (const void *pointer, void *data,
{
if (strchr (ptr_nick->prefix_color, '.'))
{
config_file_search_with_string (ptr_nick->prefix_color,
NULL, NULL, &ptr_option,
NULL);
config_file_search_with_string (
ptr_nick->prefix_color,
NULL, NULL, &ptr_option, NULL);
if (ptr_option)
{
string_dyn_concat (
@@ -1907,9 +1907,9 @@ gui_bar_item_buffer_nicklist_cb (const void *pointer, void *data,
{
if (strchr (ptr_nick->color, '.'))
{
config_file_search_with_string (ptr_nick->color,
NULL, NULL, &ptr_option,
NULL);
config_file_search_with_string (
ptr_nick->color,
NULL, NULL, &ptr_option, NULL);
if (ptr_option)
{
string_dyn_concat (
@@ -1940,9 +1940,9 @@ gui_bar_item_buffer_nicklist_cb (const void *pointer, void *data,
{
if (strchr (ptr_group->color, '.'))
{
config_file_search_with_string (ptr_group->color,
NULL, NULL, &ptr_option,
NULL);
config_file_search_with_string (
ptr_group->color,
NULL, NULL, &ptr_option, NULL);
if (ptr_option)
{
string_dyn_concat (
+1 -2
View File
@@ -170,8 +170,7 @@ gui_color_search_config (const char *color_name)
/* search in any configuration file (example: "irc.color.message_quit") */
if (strchr (color_name, '.'))
{
config_file_search_with_string (color_name, NULL, NULL, &ptr_option,
NULL);
config_file_search_with_string (color_name, NULL, NULL, &ptr_option, NULL);
if (ptr_option)
return gui_color_from_option (ptr_option);
}
+2 -2
View File
@@ -76,7 +76,7 @@ struct t_weelist_item;
* please change the date with current one; for a second change at same
* date, increment the 01, otherwise please keep 01.
*/
#define WEECHAT_PLUGIN_API_VERSION "20260530-01"
#define WEECHAT_PLUGIN_API_VERSION "20260614-01"
/* macros for defining plugin infos */
#define WEECHAT_PLUGIN_NAME(__name) \
@@ -671,7 +671,7 @@ struct t_weechat_plugin
struct t_config_file **config_file,
struct t_config_section **section,
struct t_config_option **option,
char **pos_option_name);
const char **pos_option_name);
int (*config_string_to_boolean) (const char *text);
int (*config_option_reset) (struct t_config_option *option,
int run_callback);
+1 -1
View File
@@ -526,7 +526,7 @@ TEST(CoreConfigFile, SearchWithString)
struct t_config_file *ptr_config;
struct t_config_section *ptr_section;
struct t_config_option *ptr_option;
char *pos_option_name;
const char *pos_option_name;
ptr_config = (struct t_config_file *)0x1;
ptr_section = (struct t_config_section *)0x1;