summaryrefslogtreecommitdiffhomepage
path: root/examples/new_queue.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-07-06 22:26:53 +0200
committerTyge Løvset <[email protected]>2022-07-06 22:26:53 +0200
commitb94170eefce899d0b236804681d77fe026956fd9 (patch)
tree9d1bad3bdfce085cc8ff8c567943ffd8750aa644 /examples/new_queue.c
parent6e91820d7cf632ff30b936c554a0bdf83c9e64b2 (diff)
downloadSTC-modified-b94170eefce899d0b236804681d77fe026956fd9.tar.gz
STC-modified-b94170eefce899d0b236804681d77fe026956fd9.zip
Version 3.7. Make sure to check NEWS/Changes in README.md for a few code-breaking API changes.
Diffstat (limited to 'examples/new_queue.c')
-rw-r--r--examples/new_queue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/new_queue.c b/examples/new_queue.c
index f3051871..ea68c9b9 100644
--- a/examples/new_queue.c
+++ b/examples/new_queue.c
@@ -31,7 +31,7 @@ int main() {
cqueue_int_push(&Q, stc64_uniform(&rng, &dist));
// Push or pop on the queue ten million times
- printf("befor: size %" PRIuMAX ", capacity %" PRIuMAX "\n", cqueue_int_size(Q), cqueue_int_capacity(Q));
+ printf("befor: size %" PRIuMAX ", capacity %" PRIuMAX "\n", cqueue_int_size(&Q), cqueue_int_capacity(&Q));
for (int i=n; i>0; --i) {
int r = stc64_uniform(&rng, &dist);
if (r & 1)
@@ -39,6 +39,6 @@ int main() {
else
cqueue_int_pop(&Q);
}
- printf("after: size %" PRIuMAX ", capacity %" PRIuMAX "\n", cqueue_int_size(Q), cqueue_int_capacity(Q));
+ printf("after: size %" PRIuMAX ", capacity %" PRIuMAX "\n", cqueue_int_size(&Q), cqueue_int_capacity(&Q));
}
}