comparison th_datastruct.h @ 731:98d12f33da7b

Change th_ringbuf_new() API.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 07 Dec 2022 00:15:38 +0200
parents 29e44a58bc73
children 79d06eb6d39f
comparison
equal deleted inserted replaced
730:1a3ea8f7bb35 731:98d12f33da7b
62 BOOL allocated; 62 BOOL allocated;
63 } th_ringbuf_t; 63 } th_ringbuf_t;
64 64
65 65
66 int th_ringbuf_init(th_ringbuf_t *buf, const size_t size, void (*mdeallocator)(void *data)); 66 int th_ringbuf_init(th_ringbuf_t *buf, const size_t size, void (*mdeallocator)(void *data));
67 th_ringbuf_t * th_ringbuf_new(const size_t size, void (*mdeallocator)(void *data)); 67 int th_ringbuf_new(th_ringbuf_t **buf, const size_t size, void (*mdeallocator)(void *data));
68 int th_ringbuf_grow(th_ringbuf_t *buf, const size_t n); 68 int th_ringbuf_grow(th_ringbuf_t *buf, const size_t n);
69 void th_ringbuf_free(th_ringbuf_t *buf); 69 void th_ringbuf_free(th_ringbuf_t *buf);
70 void th_ringbuf_add(th_ringbuf_t *buf, void *ptr); 70 void th_ringbuf_add(th_ringbuf_t *buf, void *ptr);
71 71
72 72