diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-08-30 22:44:05 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-08-30 22:44:05 -0700 |
commit | f5e4e0c1816a83c06ff4d57ee1c5272b055a54f4 (patch) | |
tree | d427bcd9c116d2e6c78f7cc7b8874aea06dfb9ff | |
parent | 7e7db8eb8e8f73f04ca3acdfc2078a7122932fd2 (diff) |
til_settings: privatize til_settings_get_and_describe_value()
This function is effectively deprecated, but
til_settings_apply_desc_generators() still makes use of it.
So for now just making it private until I feel like either
refactoring the desc generators to not use it, or maybe just
moving a simpler open-coded form into
til_settings_apply_desc_generators().
-rw-r--r-- | src/til_settings.c | 5 | ||||
-rw-r--r-- | src/til_settings.h | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/til_settings.c b/src/til_settings.c index fb21af7..068a550 100644 --- a/src/til_settings.c +++ b/src/til_settings.c @@ -376,13 +376,16 @@ int til_settings_get_and_describe_setting(const til_settings_t *settings, const } +/* FIXME TODO: this is deprecated, but kept around just for til_settings_apply_desc_generators() use, + * hence static. + */ /* helper for the common setup case of describing a setting when absent or not yet described. * returns: * -1 on error, res_* will be untouched in this case. * 0 when setting is present and described, res_value and res_setting will be populated w/non-NULL, and res_desc NULL in this case. * 1 when setting is either present but undescribed, or absent (and undescribed), res_* will be populated but res_{value,setting} may be NULL if absent and simply described. */ -int til_settings_get_and_describe_value(const til_settings_t *settings, const til_setting_spec_t *spec, const char **res_value, til_setting_t **res_setting, const til_setting_desc_t **res_desc) +static int til_settings_get_and_describe_value(const til_settings_t *settings, const til_setting_spec_t *spec, const char **res_value, til_setting_t **res_setting, const til_setting_desc_t **res_desc) { til_setting_t *setting; const char *value; diff --git a/src/til_settings.h b/src/til_settings.h index be01b5b..0e18d22 100644 --- a/src/til_settings.h +++ b/src/til_settings.h @@ -59,7 +59,6 @@ const char * til_settings_get_value_by_idx(const til_settings_t *settings, unsig til_setting_t * til_settings_add_value(til_settings_t *settings, const char *key, const char *value); void til_settings_reset_descs(til_settings_t *settings); int til_settings_get_and_describe_setting(const til_settings_t *settings, const til_setting_spec_t *spec, til_setting_t **res_setting, til_setting_t **res_setting_bis, const til_setting_desc_t **res_desc); -int til_settings_get_and_describe_value(const til_settings_t *settings, const til_setting_spec_t *spec, const char **res_value, til_setting_t **res_setting, const til_setting_desc_t **res_desc); char * til_settings_as_arg(const til_settings_t *settings); char * til_settings_as_arg_unfiltered(const til_settings_t *settings); int til_settings_apply_desc_generators(const til_settings_t *settings, const til_setting_desc_generator_t generators[], unsigned n_generators, til_setup_t *setup, til_setting_t **res_setting, const til_setting_desc_t **res_desc, til_setup_t **res_setup); |