summaryrefslogtreecommitdiff
path: root/src/til_settings.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-05-09 14:57:10 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-05-11 15:19:25 -0700
commita4d52bcd363ee185ff20c74b3c97de96e314d381 (patch)
tree0c34191ca0b31f885f733a8629ca7ab7b98a4106 /src/til_settings.c
parent974c464d4b2b12682d1a33a2e8ffe105bd78b519 (diff)
til_settings: make use of til_setting_desc_t.container
This commit pivots everything over to using desc->container as the target settings instance when adding settings, as well as actually assigning the settings container @ desc create. Given nothing is actually triggering settings heirarchies yet (no specs set as_nested_settings) this shouldn't actually result in any realized functional difference, yet. The settings pointer being placed in desc->container should be identical to what was getting used before.
Diffstat (limited to 'src/til_settings.c')
-rw-r--r--src/til_settings.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/til_settings.c b/src/til_settings.c
index 4749372..4631849 100644
--- a/src/til_settings.c
+++ b/src/til_settings.c
@@ -363,6 +363,8 @@ int til_setting_desc_new(const til_settings_t *settings, const til_setting_spec_
if (!d)
return -ENOMEM;
+ /* XXX: intentionally casting away the const here, since the purpose of desc->container is to point where to actually put the setting for the front-end setup code */
+ d->container = (til_settings_t *)settings;
if (spec->name)
d->spec.name = strdup(spec->name);
© All Rights Reserved