Port DualPush list to new format
This commit is contained in:
1 parent
bd9485a3fe
commit
33aa102b7c
2 files changed
+6
-3
No files matched your search
@@ -80,6 +80,9 @@ ALGO_DEF(list, LIST_OPLIST(list, M_BASIC_OPLIST))
|
|||||||
LIST_DEF(list_str, string_t)
|
LIST_DEF(list_str, string_t)
|
||||||
ALGO_DEF(list_str, LIST_OPLIST(list_str, M_STRING_OPLIST))
|
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"
|
#include "m-bptree.h"
|
||||||
|
|
||||||
BPTREE_DEF2(bptree, 5, int, int)
|
BPTREE_DEF2(bptree, 5, int, int)
|
||||||
|
|||||||
@@ -1192,7 +1192,7 @@
|
|||||||
M_P(void, name, _push_front_move, list_t v, type *x) \
|
M_P(void, name, _push_front_move, list_t v, type *x) \
|
||||||
{ \
|
{ \
|
||||||
M_ASSERT (x != NULL); \
|
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)) \
|
if (M_UNLIKELY (data == NULL)) \
|
||||||
return; \
|
return; \
|
||||||
M_CALL_INIT_MOVE (oplist, *data, *x); \
|
M_CALL_INIT_MOVE (oplist, *data, *x); \
|
||||||
@@ -1202,7 +1202,7 @@
|
|||||||
M_P(type *, name, _push_front_new, list_t v) \
|
M_P(type *, name, _push_front_new, list_t v) \
|
||||||
{ \
|
{ \
|
||||||
M_IF_EXCEPTION(struct M_F(name, _s) *front = v->front, *back = v->back); \
|
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)) \
|
if (M_UNLIKELY (data == NULL)) \
|
||||||
return NULL; \
|
return NULL; \
|
||||||
M_IF_EXCEPTION(struct M_F(name, _s) *m_volatile tofree = v->front); \
|
M_IF_EXCEPTION(struct M_F(name, _s) *m_volatile tofree = v->front); \
|
||||||
@@ -1397,7 +1397,7 @@
|
|||||||
M_ASSERT (list != org); \
|
M_ASSERT (list != org); \
|
||||||
M_ON_EXCEPTION( M_F(name, _clear)(list)) { \
|
M_ON_EXCEPTION( M_F(name, _clear)(list)) { \
|
||||||
M_F(name, _init)(list); \
|
M_F(name, _init)(list); \
|
||||||
M_F(name, _set)(list, org); \
|
M_F(name, _set) M_R(list, org); \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
|||||||
Reference in new issue
Block a user