summaryrefslogtreecommitdiffhomepage
path: root/examples/queue.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-05-24 12:43:39 +0200
committerTyge Løvset <[email protected]>2021-05-24 12:43:39 +0200
commit64f50b93b08a8015783b2887e1ab5afd5fedb40c (patch)
treeca70f0b4c87b0d59a9689b12d26bfa2bab160916 /examples/queue.c
parent771a8dff31b0c0a905c57ec6f590cd03975f8817 (diff)
downloadSTC-modified-64f50b93b08a8015783b2887e1ab5afd5fedb40c.tar.gz
STC-modified-64f50b93b08a8015783b2887e1ab5afd5fedb40c.zip
Renamed c_with => c_fordefer, and removed c_withvar. Macros were too deceiving and hid the fact that it was for-loops. Now it is more explicit.
Diffstat (limited to 'examples/queue.c')
-rw-r--r--examples/queue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/queue.c b/examples/queue.c
index e3a74f33..d2687507 100644
--- a/examples/queue.c
+++ b/examples/queue.c
@@ -17,7 +17,7 @@ int main() {
stc64_t rng = stc64_init(1234);
dist = stc64_uniform_init(0, n);
- c_withvar (cqueue_i, queue)
+ c_fordefer (cqueue_i queue = cqueue_i_init(), cqueue_i_del(&queue))
{
// Push ten million random numbers onto the queue.
c_forrange (n)