From 6f21210af82af9a262444b3a3396a81667b22d26 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sun, 10 Nov 2019 18:57:44 -0800 Subject: 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. --- src/settings.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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 -- cgit v1.2.3