Reverse order of a list initialized with M_LET to match the behavior of array
This commit is contained in:
1 parent
273fcd51b6
commit
17f69326e2
1 file changed
+7
-2
@@ -2666,10 +2666,15 @@ m_core_hash (const void *str, size_t length)
|
||||
|
||||
|
||||
/* Initialize the container 'dest' as per 'oplist'
|
||||
and fill it with the given VA arguments */
|
||||
and fill it with the given VA arguments.
|
||||
NOTE: If the REVERSE operator exists, it is a list,
|
||||
so reverse the final order.
|
||||
*/
|
||||
#define M_INIT_VAI(oplist, dest, ...) \
|
||||
(void)(M_GET_INIT oplist (dest) , \
|
||||
M_MAP2_C(M_INIT_VAI_FUNC, (dest, M_GET_PUSH oplist) , __VA_ARGS__))
|
||||
M_MAP2_C(M_INIT_VAI_FUNC, (dest, M_GET_PUSH oplist) , __VA_ARGS__) \
|
||||
M_IF_METHOD(REVERSE, oplist)(M_DEFERRED_COMMA M_GET_REVERSE oplist (dest), ) \
|
||||
)
|
||||
#define M_INIT_VAI_FUNC(d, a) \
|
||||
M_PAIR_2 d (M_PAIR_1 d, a)
|
||||
|
||||
|
||||
Reference in new issue
Block a user