diff options
| author | Tyge Løvset <[email protected]> | 2023-02-04 23:35:56 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-02-04 23:35:56 +0100 |
| commit | adc47cefc2976768c3f0b773bd26bfd1062e8a53 (patch) | |
| tree | 4923f88afb0d091d5d39ae03d65a4998a0517652 /misc/examples/queue.c | |
| parent | 0c4c4f8bba17562735b67b2923cd23c773aa53a7 (diff) | |
| parent | d2ff84c53aa9bd3857fdf22dcf7cd9398a4780be (diff) | |
| download | STC-modified-adc47cefc2976768c3f0b773bd26bfd1062e8a53.tar.gz STC-modified-adc47cefc2976768c3f0b773bd26bfd1062e8a53.zip | |
Merge pull request #46 from tylov/newinit
Version 4.1 RC2: signed sizes and indices, cspan with numpy slicing.
Diffstat (limited to 'misc/examples/queue.c')
| -rw-r--r-- | misc/examples/queue.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/examples/queue.c b/misc/examples/queue.c index 1d325fc6..ee537b58 100644 --- a/misc/examples/queue.c +++ b/misc/examples/queue.c @@ -15,17 +15,17 @@ int main() { { // Push ten million random numbers onto the queue. c_FORRANGE (n) - cqueue_i_push(&queue, stc64_uniform(&rng, &dist)); + cqueue_i_push(&queue, (int)stc64_uniform(&rng, &dist)); // Push or pop on the queue ten million times printf("%d\n", n); c_FORRANGE (n) { // forrange uses initial n only. - int r = stc64_uniform(&rng, &dist); + int r = (int)stc64_uniform(&rng, &dist); if (r & 1) ++n, cqueue_i_push(&queue, r); else --n, cqueue_i_pop(&queue); } - printf("%d, %" c_ZU "\n", n, cqueue_i_size(&queue)); + printf("%d, %" c_ZI "\n", n, cqueue_i_size(&queue)); } } |
