diff th_datastruct.h @ 632:553db886533e

Return a THERR_* error value from th_ringbuf_grow() instead of BOOL. This breaks the API, but checking against BOOL will result in failure in case of actual success (THERR_OK == 0) which should be "easy" to detect.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 17 Jan 2020 20:08:55 +0200
parents d5221299656a
children 9c61834c191b
line wrap: on
line diff
--- a/th_datastruct.h	Fri Jan 17 20:07:25 2020 +0200
+++ b/th_datastruct.h	Fri Jan 17 20:08:55 2020 +0200
@@ -67,7 +67,7 @@
 
 int            th_ringbuf_init(th_ringbuf_t *buf, const size_t size, void (*mdeallocator)(void *data));
 th_ringbuf_t * th_ringbuf_new(const size_t size, void (*mdeallocator)(void *data));
-BOOL           th_ringbuf_grow(th_ringbuf_t *buf, const size_t n);
+int            th_ringbuf_grow(th_ringbuf_t *buf, const size_t n);
 void           th_ringbuf_free(th_ringbuf_t *buf);
 void           th_ringbuf_add(th_ringbuf_t *buf, void *ptr);