mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
config_section() and config_list_section() changed
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@38 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
95c6a0d9f6
commit
ccfef94ec5
@ -134,34 +134,32 @@ proplist_t config_clean_key(proplist_t prop, gchar *key)
|
||||
return prop;
|
||||
}
|
||||
|
||||
proplist_t config_section(proplist_t prop, gchar *section)
|
||||
proplist_t config_section(proplist_t *prop, gchar *section)
|
||||
{
|
||||
proplist_t ret, pkey, psect;
|
||||
proplist_t ret, pkey;
|
||||
|
||||
pkey = PLMakeString(section);
|
||||
ret = PLGetDictionaryEntry(prop, pkey);
|
||||
ret = PLGetDictionaryEntry(*prop, pkey);
|
||||
if (ret == NULL)
|
||||
{
|
||||
psect = PLMakeDictionaryFromEntries(NULL, NULL);
|
||||
prop = PLInsertDictionaryEntry(prop, pkey, psect);
|
||||
ret = PLGetDictionaryEntry(prop, pkey);
|
||||
ret = PLMakeDictionaryFromEntries(NULL, NULL);
|
||||
*prop = PLInsertDictionaryEntry(*prop, pkey, ret);
|
||||
}
|
||||
PLRelease(pkey);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
proplist_t config_list_section(proplist_t prop, gchar *section)
|
||||
proplist_t config_list_section(proplist_t *prop, gchar *section)
|
||||
{
|
||||
proplist_t ret, pkey, psect;
|
||||
proplist_t ret, pkey;
|
||||
|
||||
pkey = PLMakeString(section);
|
||||
ret = PLGetDictionaryEntry(prop, pkey);
|
||||
ret = PLGetDictionaryEntry(*prop, pkey);
|
||||
if (ret == NULL)
|
||||
{
|
||||
psect = PLMakeArrayFromElements(NULL);
|
||||
prop = PLInsertDictionaryEntry(prop, pkey, psect);
|
||||
ret = PLGetDictionaryEntry(prop, pkey);
|
||||
ret = PLMakeArrayFromElements(NULL);
|
||||
*prop = PLInsertDictionaryEntry(*prop, pkey, ret);
|
||||
}
|
||||
PLRelease(pkey);
|
||||
|
||||
|
@ -15,8 +15,8 @@ proplist_t config_set_str(proplist_t prop, gchar *key, gchar *value);
|
||||
proplist_t config_set_int(proplist_t prop, gchar *key, gint value);
|
||||
proplist_t config_set_bool(proplist_t prop, gchar *key, gboolean value);
|
||||
|
||||
proplist_t config_section(proplist_t prop, gchar *section);
|
||||
proplist_t config_list_section(proplist_t prop, gchar *section);
|
||||
proplist_t config_section(proplist_t *prop, gchar *section);
|
||||
proplist_t config_list_section(proplist_t *prop, gchar *section);
|
||||
proplist_t config_make_dict(proplist_t prop, gchar *section);
|
||||
proplist_t config_clean_key(proplist_t prop, gchar *key);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user