diff --git a/m-core.h b/m-core.h index 23252518..7354a508 100644 --- a/m-core.h +++ b/m-core.h @@ -818,7 +818,8 @@ m_core_hash (const void *str, size_t wrdlen) /* Define the default method. */ #define M_INIT_DEFAULT(a) ((a) = 0) #define M_SET_DEFAULT(a,b) ((a) = (b)) -#define M_NOTHING_DEFAULT(a) (void)a +#define M_NOTHING_DEFAULT(...) (void)1 +#define M_TRUE_DEFAULT(...) true #define M_NEW_DEFAULT(a) M_MEMORY_ALLOC(a) #define M_DEL_DEFAULT(a) M_MEMORY_DEL(a) #define M_REALLOC_DEFAULT(t,p,s) M_MEMORY_REALLOC(t,p,s) diff --git a/m-dict.h b/m-dict.h index 02f887c0..a77ab3a7 100644 --- a/m-dict.h +++ b/m-dict.h @@ -66,8 +66,8 @@ ARRAY_DEF(M_C(list_dict_pair_,name), M_C3(list_dict_pair_,name,_t), LIST_OPLIST(M_C(dict_pair_, name), TUPLE_OPLIST(M_C(dict_pair_, name), key_oplist))) \ \ DICTI_DEF2_FUNC(name, key_type, key_oplist, key_type, \ - (INIT(DICTI_EMPTY_FUNC), INIT_SET(DICTI_EMPTY_FUNC), SET(DICTI_EMPTY_FUNC), CLEAR(DICTI_EMPTY_FUNC), \ - EQUAL(DICTI_EMPTY_FUNC), GET_STR(DICTI_EMPTY_FUNC), OUT_STR(DICTI_EMPTY_FUNC), IN_STR(DICTI_RETURN_TRUE)), 1) + (INIT(M_NOTHING_DEFAULT), INIT_SET(M_NOTHING_DEFAULT), SET(M_NOTHING_DEFAULT), CLEAR(M_NOTHING_DEFAULT), \ + EQUAL(M_NOTHING_DEFAULT), GET_STR(M_NOTHING_DEFAULT), OUT_STR(M_NOTHING_DEFAULT), IN_STR(M_TRUE_DEFAULT)), 1) /* Define the oplist of a dictionnary. @@ -80,11 +80,6 @@ /********************************** INTERNAL ************************************/ -/* Do nothing !*/ -#define DICTI_EMPTY_FUNC(...) /* empty */ -/* Return true! */ -#define DICTI_RETURN_TRUE(...) true - #define DICTI_DEF2_FUNC(name, key_type, key_oplist, value_type, value_oplist, isSet) \ \ typedef struct M_C3(dict_, name, _s) { \