Port DualPush list to new format

This commit is contained in:
Patrick Pelissier committed 2025-05-07 21:02:24 +02:00
1 parent bd9485a3fe
commit 33aa102b7c
2 files changed
+6 -3

No files matched your search

+3
View File
@@ -80,6 +80,9 @@ ALGO_DEF(list, LIST_OPLIST(list, M_BASIC_OPLIST))
LIST_DEF(list_str, string_t)
ALGO_DEF(list_str, LIST_OPLIST(list_str, M_STRING_OPLIST))
LIST_DUAL_PUSH_DEF(list2, int)
LIST_DUAL_PUSH_DEF(list2_str, string_t)
#include "m-bptree.h"
BPTREE_DEF2(bptree, 5, int, int)
+3 -3
View File
@@ -1192,7 +1192,7 @@
M_P(void, name, _push_front_move, list_t v, type *x) \
{ \
M_ASSERT (x != NULL); \
type *data = M_F(name, _push_front_raw)(v); \
type *data = M_F(name, _push_front_raw)M_R(v); \
if (M_UNLIKELY (data == NULL)) \
return; \
M_CALL_INIT_MOVE (oplist, *data, *x); \
@@ -1202,7 +1202,7 @@
M_P(type *, name, _push_front_new, list_t v) \
{ \
M_IF_EXCEPTION(struct M_F(name, _s) *front = v->front, *back = v->back); \
type *data = M_F(name, _push_front_raw)(v); \
type *data = M_F(name, _push_front_raw)M_R(v); \
if (M_UNLIKELY (data == NULL)) \
return NULL; \
M_IF_EXCEPTION(struct M_F(name, _s) *m_volatile tofree = v->front); \
@@ -1397,7 +1397,7 @@
M_ASSERT (list != org); \
M_ON_EXCEPTION( M_F(name, _clear)(list)) { \
M_F(name, _init)(list); \
M_F(name, _set)(list, org); \
M_F(name, _set) M_R(list, org); \
} \
} \
\