This commit is contained in:
Patrick Pelissier committed 2017-08-12 18:40:00 +02:00
1 parent a4b1a82ae0
commit b701fe8228
1 file changed
+13 -13
+13 -13
View File
@@ -122,19 +122,6 @@
} \
\
static inline void \
M_C(name, _clear)(deque_t d) \
{ \
DEQUEI_CONTRACT(d); \
/* BUG: clear on the objects of the node not called!!!! */ \
/* We registered the delete operator to clear all objects */ \
M_C(name, _node_list_clear)(d->list); \
/* It is safer to clean some variables*/ \
d->front->node = NULL; \
d->back->node = NULL; \
d->count = 0; \
} \
\
static inline void \
M_C(name, _clean)(deque_t d) \
{ \
DEQUEI_CONTRACT(d); \
@@ -160,6 +147,19 @@
} \
\
static inline void \
M_C(name, _clear)(deque_t d) \
{ \
DEQUEI_CONTRACT(d); \
M_C(name, _clean)(d); \
/* We registered the delete operator to clear all objects */ \
M_C(name, _node_list_clear)(d->list); \
/* It is safer to clean some variables*/ \
d->front->node = NULL; \
d->back->node = NULL; \
d->count = 0; \
} \
\
static inline void \
M_C(name, _push_back)(deque_t d, type const x) \
{ \
DEQUEI_CONTRACT(d); \