mirror of
https://github.com/irssi/irssi.git
synced 2025-04-26 04:51:11 -05:00
section can be NULL - which is same as "". Fixed several functions to allow
it. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@164 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
53b248f6de
commit
4482d518b8
@ -107,11 +107,10 @@ char *config_get_str(CONFIG_REC *rec, const char *section, const char *key, cons
|
|||||||
char *path;
|
char *path;
|
||||||
|
|
||||||
g_return_val_if_fail(rec != NULL, (char *) def);
|
g_return_val_if_fail(rec != NULL, (char *) def);
|
||||||
g_return_val_if_fail(section != NULL, (char *) def);
|
|
||||||
g_return_val_if_fail(key != NULL, (char *) def);
|
g_return_val_if_fail(key != NULL, (char *) def);
|
||||||
|
|
||||||
/* check if it already exists in cache */
|
/* check if it already exists in cache */
|
||||||
path = g_strconcat(section, "/", key, NULL);
|
path = g_strconcat(section == NULL ? "" : section, "/", key, NULL);
|
||||||
node = g_hash_table_lookup(rec->cache, path);
|
node = g_hash_table_lookup(rec->cache, path);
|
||||||
|
|
||||||
if (node != NULL)
|
if (node != NULL)
|
||||||
@ -168,7 +167,6 @@ CONFIG_NODE *config_list_find_node(CONFIG_REC *rec, const char *section, const c
|
|||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
|
|
||||||
g_return_val_if_fail(rec != NULL, NULL);
|
g_return_val_if_fail(rec != NULL, NULL);
|
||||||
g_return_val_if_fail(section != NULL, NULL);
|
|
||||||
g_return_val_if_fail(key != NULL, NULL);
|
g_return_val_if_fail(key != NULL, NULL);
|
||||||
g_return_val_if_fail(value_key != NULL, NULL);
|
g_return_val_if_fail(value_key != NULL, NULL);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user