16#ifndef CCC_IMPL_FLAT_DOUBLE_ENDED_QUEUE_H
17#define CCC_IMPL_FLAT_DOUBLE_ENDED_QUEUE_H
43void *ccc_impl_fdeq_alloc_front(
struct ccc_fdeq *);
45void *ccc_impl_fdeq_alloc_back(
struct ccc_fdeq *);
50#define ccc_impl_fdeq_init(impl_mem_ptr, impl_alloc_fn, impl_aux_data, \
51 impl_capacity, optional_size...) \
53 .buf = ccc_buf_init(impl_mem_ptr, impl_alloc_fn, impl_aux_data, \
54 impl_capacity, optional_size), \
59#define ccc_impl_fdeq_emplace_back(fdeq_ptr, value...) \
61 __auto_type impl_fdeq_ptr = (fdeq_ptr); \
62 void *const impl_fdeq_emplace_ret = NULL; \
65 void *const impl_fdeq_emplace_ret \
66 = ccc_impl_fdeq_alloc_back(impl_fdeq_ptr); \
67 if (impl_fdeq_emplace_ret) \
69 *((typeof(value) *)impl_fdeq_emplace_ret) = value; \
72 impl_fdeq_emplace_ret; \
76#define ccc_impl_fdeq_emplace_front(fdeq_ptr, value...) \
78 __auto_type impl_fdeq_ptr = (fdeq_ptr); \
79 void *const impl_fdeq_emplace_ret = NULL; \
82 void *const impl_fdeq_emplace_ret \
83 = ccc_impl_fdeq_alloc_front(impl_fdeq_ptr); \
84 if (impl_fdeq_emplace_ret) \
86 *((typeof(value) *)impl_fdeq_emplace_ret) = value; \
89 impl_fdeq_emplace_ret; \
struct ccc_buffer ccc_buffer
A contiguous block of storage for elements of the same type.
Definition: buffer.h:65