From 77691fbc7c5da5688433d598658d1e5d26e46c46 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Wed, 13 Jan 2021 17:40:16 +0100 Subject: Switched default cqueue underlying impl. from clist to cdeq. --- docs/cqueue_api.md | 10 +++++----- examples/queue.c | 10 +++++----- stc/cqueue.h | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/cqueue_api.md b/docs/cqueue_api.md index 3973eda2..b399a14c 100644 --- a/docs/cqueue_api.md +++ b/docs/cqueue_api.md @@ -28,7 +28,7 @@ will affect the names of all cqueue types and methods. E.g. declaring `using_cqu All cqueue definitions and prototypes may be included in your C source file by including a single header file. ```c -#include "stc/cqueue.h" /* includes default underlying implementation header clist.h */ +#include "stc/cqueue.h" /* includes default underlying implementation header cdeq.h */ ``` ## Methods @@ -61,8 +61,8 @@ cqueue_X_value_t cqueue_X_value_clone(cqueue_X_value_t val); #include #include "stc/cqueue.h" -using_clist(i, int); -using_cqueue(i, clist_i); +using_cdeq(i, int); +using_cqueue(i, cdeq_i); int main() { cqueue_i queue = cqueue_i_init(); @@ -88,10 +88,10 @@ Output: ```c #include #include "stc/cqueue.h" -#include "stc/cdeq.h" +#include "stc/clist.h" using_cdeq(i, int); -using_cqueue(i, cdeq_i); +using_cqueue(i, clist_i); int main() { cqueue_i queue = cqueue_i_init(); diff --git a/examples/queue.c b/examples/queue.c index bf287e7c..8c0a8777 100644 --- a/examples/queue.c +++ b/examples/queue.c @@ -1,14 +1,14 @@ #include #include -#include #include -#if 0 -using_clist(i, int); -using_cqueue(i, clist_i); -#else +#if 1 using_cdeq(i, int); using_cqueue(i, cdeq_i); +#else +#include +using_clist(i, int); +using_cqueue(i, clist_i); #endif int main() { diff --git a/stc/cqueue.h b/stc/cqueue.h index 0481797e..368694c6 100644 --- a/stc/cqueue.h +++ b/stc/cqueue.h @@ -27,8 +27,8 @@ #include #include - using_clist(i, int); - using_cqueue(i, clist_i); + using_cdeq(i, int); + using_cqueue(i, cdeq_i); int main() { int n = 10000000; @@ -54,7 +54,7 @@ cqueue_i_del(&queue); } */ -#include "clist.h" +#include "cdeq.h" #define using_cqueue(X, ctype) \ typedef ctype##_t cqueue_##X; \ -- cgit v1.2.3