/* SPDX-License-Identifier: MIT */ #include #include #include #define rb_size_t size_t #include "ringbuf.h" int main(void) { struct RingBuf rb; rb_init(&rb, 10, malloc, sizeof(int)); int data = 5; rb_push_back(&rb, &data, memcpy); int d; rb_pop_front(&rb, &d); printf("Data: %d\n", d); rb_destroy(&rb, free); return 0; }