diff options
| author | Tyge Løvset <[email protected]> | 2021-01-13 17:40:16 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-01-13 17:40:16 +0100 |
| commit | 77691fbc7c5da5688433d598658d1e5d26e46c46 (patch) | |
| tree | 946b71680aa33f870169cbfc5d5aea2aa15cc956 | |
| parent | b41fe24b6c2e60265152ec618aa7cc806d9435d1 (diff) | |
| download | STC-modified-77691fbc7c5da5688433d598658d1e5d26e46c46.tar.gz STC-modified-77691fbc7c5da5688433d598658d1e5d26e46c46.zip | |
Switched default cqueue underlying impl. from clist to cdeq.
| -rw-r--r-- | docs/cqueue_api.md | 10 | ||||
| -rw-r--r-- | examples/queue.c | 10 | ||||
| -rw-r--r-- | 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 <stdio.h> #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 <stdio.h> #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 <stc/crand.h>
#include <stc/cqueue.h>
-#include <stc/cdeq.h>
#include <stdio.h>
-#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 <stc/clist.h>
+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 <stc/crand.h>
#include <stc/cqueue.h>
- 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; \
|
