summaryrefslogtreecommitdiff
path: root/src/til.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-06-03 14:33:31 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-06-03 14:33:31 -0700
commit2c58bc3a9821faa454dcd270815f9e001f825b6a (patch)
tree67d8e3a0bf0783895cc36bfcebb05cbcb70a64df /src/til.c
parentb533125a1c4a951b941bf6983e0b4d6973718758 (diff)
til_settings: add an optional til_settings_t.prefix
Preparatory commit for bridging the gap separating a baked til_setup_t from a runtime-populated descendant til_settings_t like modules::rtv produces for its channels via til_module_setup_randomize(). For these currently orphaned til_settings_t instances we don't readily have access to the logical ancestor til_settings_t that was used to produce the module_context's bound til_setup_t. But we don't really need the ancestor til_settings_t, all we _really_ want is the ancestral path to prefix the orphan til_settings_t instances. So this commit introduces supplying a prefix which gets prepended to paths printed via the settings instance. A later commit will make use of this in modules::rtv when producing the settings instance passed to til_module_setup_randomize()
Diffstat (limited to 'src/til.c')
-rw-r--r--src/til.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/til.c b/src/til.c
index b9ccde0..6054014 100644
--- a/src/til.c
+++ b/src/til.c
@@ -374,7 +374,7 @@ int til_module_setup_randomize(const til_module_t *module, unsigned seed, til_se
* other state to indicate which ones should always be randomized vs. ones which were
* explicitly specified to stay fixed.
*/
- settings = til_settings_new(NULL, module->name, NULL);
+ settings = til_settings_new(NULL, NULL, module->name, NULL);
if (!settings)
return -ENOMEM;
@@ -442,7 +442,7 @@ int til_module_setup_randomize(const til_module_t *module, unsigned seed, til_se
break;
}
- setting->value_as_nested_settings = til_settings_new(desc->container, desc->spec.key ? : label, setting->value);
+ setting->value_as_nested_settings = til_settings_new(NULL, desc->container, desc->spec.key ? : label, setting->value);
free(label);
if (!setting->value_as_nested_settings) {
© All Rights Reserved