diff --git a/lab01/zad1/src/main.c b/lab01/zad1/src/main.c index feb784e..8bea2c3 100644 --- a/lab01/zad1/src/main.c +++ b/lab01/zad1/src/main.c @@ -2,14 +2,15 @@ #include #include +#include #include #include void test_queue(size_t size) { - Queue *q = queue_new(size, sizeof(long)); + Queue *q = queue_new(size, sizeof(int64_t)); for (size_t i = 0; i < 50; ++i) { - long val = rand() % 1000; + int64_t val = rand() % 1000; printf("%zu: writing %ld to queue...\n", i, val); if (queue_write(q, &val)) { printf("%zu: successfully wrote %ld to queue!\n", i, val); @@ -25,7 +26,7 @@ void test_queue(size_t size) { break; } - long val = *(long*)val_ptr; + int64_t val = *(int64_t*)val_ptr; printf("%zu: read %ld from queue\n", i, val); free(val_ptr); } @@ -34,10 +35,10 @@ void test_queue(size_t size) { } void test_stack(size_t size) { - Stack *s = stack_new(size, sizeof(long)); + Stack *s = stack_new(size, sizeof(int64_t)); for (size_t i = 0; i < 50; ++i) { - long val = rand() % 1000; + int64_t val = rand() % 1000; printf("%zu: pushing %ld on top of stack...\n", i, val); if (stack_push(s, &val)) { printf("%zu: successfully pushed %ld on top of stack!\n", i, val); @@ -53,7 +54,7 @@ void test_stack(size_t size) { break; } - long val = *(long*)val_ptr; + int64_t val = *(int64_t*)val_ptr; printf("%zu: popped %ld from stack\n", i, val); free(val_ptr); }