diff options
Diffstat (limited to 'src/glibext/configuration.h')
-rw-r--r-- | src/glibext/configuration.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/glibext/configuration.h b/src/glibext/configuration.h index 13bc1da..49a289b 100644 --- a/src/glibext/configuration.h +++ b/src/glibext/configuration.h @@ -234,6 +234,19 @@ GCfgParam *_g_generic_config_add_param(GGenConfig *, GCfgParam *, bool); }) +#define g_generic_config_create_param_if_not_exist(c, p, t, d) \ + ({ \ + GCfgParam *__result; \ + __result = g_generic_config_search(c, p); \ + if (__result == NULL) \ + { \ + __result = g_config_param_new(p, t, d); \ + __result = g_generic_config_add_param(c, __result); \ + } \ + __result; \ + }) + + #define g_generic_config_create_or_udpdate_param(c, p, t, d, v) \ ({ \ GCfgParam *__param; \ |