mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Expose conf_clear(), for test purposes.
Normally you don't ever want to have a Conf structure that doesn't have an entry for every primary key, because the code that uses Conf to get real work done will fail assertions if lookups fail. But test programs manipulating Conf in unusual ways are a special case. (In particular, one thing you _can_ legally do with an empty Conf is to call load_open_settings() to populate it. That has to be legal, because it's how a Conf gets populated in the first place, after it's initially created empty.)
This commit is contained in:
parent
cfdff822c4
commit
6371702145
1
putty.h
1
putty.h
@ -2056,6 +2056,7 @@ enum config_primary_key { CONFIG_OPTIONS(CONF_ENUM_DEF) N_CONFIG_OPTIONS };
|
||||
/* Functions handling configuration structures. */
|
||||
Conf *conf_new(void); /* create an empty configuration */
|
||||
void conf_free(Conf *conf);
|
||||
void conf_clear(Conf *conf); /* likely only useful for test programs */
|
||||
Conf *conf_copy(Conf *oldconf);
|
||||
void conf_copy_into(Conf *dest, Conf *src);
|
||||
/* Mandatory accessor functions: enforce by assertion that keys exist. */
|
||||
|
@ -211,7 +211,7 @@ Conf *conf_new(void)
|
||||
return conf;
|
||||
}
|
||||
|
||||
static void conf_clear(Conf *conf)
|
||||
void conf_clear(Conf *conf)
|
||||
{
|
||||
struct conf_entry *entry;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user