* Dict supports INIT_WITH method too.

This commit is contained in:
Patrick Pelissier committed 2020-03-29 00:49:36 +01:00
1 parent be06426783
commit e7fcefb391
2 files changed
+9

No files matched your search

+8
View File
@@ -2528,6 +2528,14 @@ m_core_hash (const void *str, size_t length)
#define M_INIT_VAI_FUNC(d, a) \
M_PAIR_2 d (M_PAIR_1 d, a)
/* Initialize the container 'dest' as per 'oplist'
and fill it with the given VA arguments which are pair of (key,value) */
#define M_INIT_KEY_VAI(oplist, dest, ...) \
(void)(M_GET_INIT oplist (dest) , \
M_MAP2_C(M_INIT_KEY_VAI_FUNC, (dest, M_GET_SET_KEY oplist) , __VA_ARGS__))
#define M_INIT_KEY_VAI_FUNC(d, a) \
M_PAIR_2 d (M_PAIR_1 d, M_PAIR_1 a, M_PAIR_2 a)
/************************************************************/
/********************* MEMORY handling **********************/
+1
View File
@@ -921,6 +921,7 @@
#define DICTI_OPLIST_P2(name, key_oplist, value_oplist) \
(INIT(M_C(name, _init)), \
INIT_SET(M_C(name, _init_set)), \
INIT_WITH(API_1(M_INIT_KEY_VAI)), \
SET(M_C(name, _set)), \
CLEAR(M_C(name, _clear)), \
INIT_MOVE(M_C(name, _init_move)), \