summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-08-10 20:43:26 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-08-10 20:43:26 (GMT)
commitd19bfec27f4ed528c5ca569dcbb6621185db0c48 (patch)
treeabea11480a26af2861983d8bf883b3a575027d39 /src
parentde379f531ad5fa356b33287196f884550abd2af4 (diff)
Avoided to mark newly created parameters as default in some cases.
Diffstat (limited to 'src')
-rw-r--r--src/glibext/configuration.c1
-rw-r--r--src/glibext/configuration.h18
2 files changed, 10 insertions, 9 deletions
diff --git a/src/glibext/configuration.c b/src/glibext/configuration.c
index 32eefa7..0d3d011 100644
--- a/src/glibext/configuration.c
+++ b/src/glibext/configuration.c
@@ -1033,6 +1033,7 @@ GCfgGroup *g_config_group_new(const char *root, ConfigParamType type)
/******************************************************************************
* *
* Paramètres : group = groupe de paramètres de configuration à étudier. *
+* config = ensemble de paramètres à compléter. *
* context = contexte de lecture d'un fichier XML. *
* *
* Description : Charge tous les paramètres correspondants au groupe. *
diff --git a/src/glibext/configuration.h b/src/glibext/configuration.h
index a3cbb1c..7da2452 100644
--- a/src/glibext/configuration.h
+++ b/src/glibext/configuration.h
@@ -195,21 +195,21 @@ GCfgParam *_g_generic_config_search(GGenConfig *, const char *, bool);
#define g_generic_config_search(cfg, p) _g_generic_config_search(cfg, p, true)
-#define g_generic_config_set_value(c, p, ...) \
+#define g_generic_config_set_value(c, p, v) \
({ \
GCfgParam *__param; \
__param = g_generic_config_search(c, p); \
if (__param != NULL) \
- g_config_param_set_value(__param, __VA_ARGS__); \
+ g_config_param_set_value(__param, v); \
__param != NULL ? true : false; \
})
-#define g_generic_config_get_value(c, p, ...) \
+#define g_generic_config_get_value(c, p, v) \
({ \
GCfgParam *__param; \
__param = g_generic_config_search(c, p); \
if (__param != NULL) \
- g_config_param_get_value(__param, __VA_ARGS__); \
+ g_config_param_get_value(__param, v); \
__param != NULL ? true : false; \
})
@@ -220,26 +220,26 @@ GCfgParam *_g_generic_config_add_param(GGenConfig *, GCfgParam *, bool);
#define g_generic_config_add_param(c, p) _g_generic_config_add_param(c, p, true)
-#define g_generic_config_create_param(c, p, t, ...) \
+#define g_generic_config_create_param(c, p, t, d) \
({ \
GCfgParam *__result; \
- __result = g_config_param_new(p, t, __VA_ARGS__); \
+ __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, ...) \
+#define g_generic_config_create_or_udpdate_param(c, p, t, d, v) \
({ \
GCfgParam *__param; \
__param = g_generic_config_search(c, p); \
if (__param == NULL) \
{ \
- __param = g_config_param_new(p, t, __VA_ARGS__); \
+ __param = g_config_param_new(p, t, d); \
__param = g_generic_config_add_param(c, __param); \
} \
if (__param != NULL) \
- g_config_param_set_value(__param, __VA_ARGS__); \
+ g_config_param_set_value(__param, v); \
__param != NULL ? true : false; \
})