19 lines
321 B
C
19 lines
321 B
C
|
/* SPDX-License-Identifier: MIT */
|
||
|
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
#define rb_size_t size_t
|
||
|
#include "ringbuf.h"
|
||
|
|
||
|
int main(void) {
|
||
|
struct RingBuf rb;
|
||
|
rb_init(&rb, 10, malloc, sizeof(int));
|
||
|
|
||
|
int data[] = {1, 2, 3, 4, 5};
|
||
|
rb_push(&rb, (void **)data, 5, memcpy);
|
||
|
|
||
|
// rb_destroy(&rb, free);
|
||
|
|
||
|
return 0;
|
||
|
}
|