diff --git a/src/cmc/queue.h b/src/cmc/queue.h index 3e47e99..acb73c3 100644 --- a/src/cmc/queue.h +++ b/src/cmc/queue.h @@ -144,25 +144,6 @@ /* Priority function */ \ CMC_DEF_FTAB_PRI(V); \ }; \ -\ - /* Queue Iterator */ \ - struct CMC_DEF_ITER(SNAME) \ - { \ - /* Target queue */ \ - struct SNAME *target; \ -\ - /* Cursor's position (index) */ \ - size_t cursor; \ -\ - /* Keeps track of relative index to the iteration of elements */ \ - size_t index; \ -\ - /* If the iterator has reached the start of the iteration */ \ - bool start; \ -\ - /* If the iterator has reached the end of the iteration */ \ - bool end; \ - }; \ \ /* Collection Functions */ \ /* Collection Allocation and Deallocation */ \ diff --git a/src/ext/cmc/queue.h b/src/ext/cmc/queue.h index 655e895..23a0e53 100644 --- a/src/ext/cmc/queue.h +++ b/src/ext/cmc/queue.h @@ -32,6 +32,25 @@ CMC_EXT_CMC_QUEUE_ITER_SOURCE_(CMC_PARAM_PFX(PARAMS), CMC_PARAM_SNAME(PARAMS), CMC_PARAM_V(PARAMS)) #define CMC_EXT_CMC_QUEUE_ITER_HEADER_(PFX, SNAME, V) \ +\ + /* Queue Iterator */ \ + struct CMC_DEF_ITER(SNAME) \ + { \ + /* Target queue */ \ + struct SNAME *target; \ +\ + /* Cursor's position (index) */ \ + size_t cursor; \ +\ + /* Keeps track of relative index to the iteration of elements */ \ + size_t index; \ +\ + /* If the iterator has reached the start of the iteration */ \ + bool start; \ +\ + /* If the iterator has reached the end of the iteration */ \ + bool end; \ + }; \ \ /* Iterator Initialization */ \ struct CMC_DEF_ITER(SNAME) CMC_(PFX, _iter_start)(struct SNAME * target); \