summaryrefslogtreecommitdiff
path: root/src/settings.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2019-11-10 18:57:44 -0800
committerVito Caputo <vcaputo@pengaru.com>2019-11-10 18:57:44 -0800
commit6f21210af82af9a262444b3a3396a81667b22d26 (patch)
treef8a9b63220e4f02b8694a1b7955ef484fff05d76 /src/settings.h
parenta48084c57aa44d0833e455f75c67703a91718d1f (diff)
settings: add a SETTINGS_STR() helper macro
Just a convenience thing as settings are all string-centric and callers like modules will probably have stuff like literal numbers defined for defaults which need to be stringified for setting_desc_t.
Diffstat (limited to 'src/settings.h')
-rw-r--r--src/settings.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/settings.h b/src/settings.h
index 6803d09..26baca7 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -33,4 +33,9 @@ int settings_apply_desc_generators(const settings_t *settings, const setting_des
int setting_desc_clone(const setting_desc_t *desc, setting_desc_t **res_desc);
void setting_desc_free(setting_desc_t *desc);
+#ifndef SETTINGS_STR
+#define _SETTINGS_STR(s) #s
+#define SETTINGS_STR(s) _SETTINGS_STR(s)
+#endif
+
#endif
© All Rights Reserved