mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 20:38:08 +01:00
lib/config: add _notmuch_config_cache
This is a simple convenience routine to cache a configuration value without writing it to the database.
This commit is contained in:
parent
c56dcea7e2
commit
87e3a82feb
2 changed files with 9 additions and 0 deletions
|
@ -464,3 +464,8 @@ notmuch_config_set (notmuch_database_t *notmuch, notmuch_config_key_t key, const
|
||||||
|
|
||||||
return notmuch_database_set_config (notmuch, _notmuch_config_key_to_string (key), val);
|
return notmuch_database_set_config (notmuch, _notmuch_config_key_to_string (key), val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_notmuch_config_cache (notmuch_database_t *notmuch, notmuch_config_key_t key, const char *val) {
|
||||||
|
_notmuch_string_map_set (notmuch->config, _notmuch_config_key_to_string (key), val);
|
||||||
|
}
|
||||||
|
|
|
@ -713,6 +713,10 @@ _notmuch_config_load_from_file (notmuch_database_t * db, GKeyFile *file);
|
||||||
|
|
||||||
notmuch_status_t
|
notmuch_status_t
|
||||||
_notmuch_config_load_defaults (notmuch_database_t * db);
|
_notmuch_config_load_defaults (notmuch_database_t * db);
|
||||||
|
|
||||||
|
void
|
||||||
|
_notmuch_config_cache (notmuch_database_t *db, notmuch_config_key_t key, const char* val);
|
||||||
|
|
||||||
NOTMUCH_END_DECLS
|
NOTMUCH_END_DECLS
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
Loading…
Reference in a new issue