mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 15:42:26 +02:00
add CONFIG_REC to config_node_section* APIs
this adds the CONFIG_REC * to the config_node_section and config_node_section_index APIs as they will require access to the config cache later on to make the config parser more robust.
This commit is contained in:
parent
6b08cbe906
commit
96d4fb9156
20 changed files with 62 additions and 60 deletions
|
|
@ -38,12 +38,12 @@ CONFIG_NODE *config_node_find(CONFIG_NODE *node, const char *key)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
CONFIG_NODE *config_node_section(CONFIG_NODE *parent, const char *key, int new_type)
|
||||
CONFIG_NODE *config_node_section(CONFIG_REC *rec, CONFIG_NODE *parent, const char *key, int new_type)
|
||||
{
|
||||
return config_node_section_index(parent, key, -1, new_type);
|
||||
return config_node_section_index(rec, parent, key, -1, new_type);
|
||||
}
|
||||
|
||||
CONFIG_NODE *config_node_section_index(CONFIG_NODE *parent, const char *key,
|
||||
CONFIG_NODE *config_node_section_index(CONFIG_REC *rec, CONFIG_NODE *parent, const char *key,
|
||||
int index, int new_type)
|
||||
{
|
||||
CONFIG_NODE *node;
|
||||
|
|
@ -101,7 +101,7 @@ CONFIG_NODE *config_node_traverse(CONFIG_REC *rec, const char *section, int crea
|
|||
is_list = **tmp == '(';
|
||||
if (create) new_type = is_list ? NODE_TYPE_LIST : NODE_TYPE_BLOCK;
|
||||
|
||||
node = config_node_section(node, *tmp + is_list, new_type);
|
||||
node = config_node_section(rec, node, *tmp + is_list, new_type);
|
||||
if (node == NULL) {
|
||||
g_strfreev(list);
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue