diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-07-03 18:14:36 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-07-04 10:37:46 +0000 |
commit | 3ef1f839fc844021a3f8134f80d4e1f9f8692177 (patch) | |
tree | eaa090c8e2883dac70bdbef063873668e9e2e2eb /toxav/ring_buffer.h | |
parent | 1a54be06cd359257478b584611f34058d21fe723 (diff) |
Add some tests for our ring_buffer implementation.
These can serve as documentation until we write actual api docs, probably
using apidsl.
Diffstat (limited to 'toxav/ring_buffer.h')
-rw-r--r-- | toxav/ring_buffer.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/toxav/ring_buffer.h b/toxav/ring_buffer.h index 036461c1..1b52cdf2 100644 --- a/toxav/ring_buffer.h +++ b/toxav/ring_buffer.h | |||
@@ -25,6 +25,10 @@ | |||
25 | #include <stdbool.h> | 25 | #include <stdbool.h> |
26 | #include <stdint.h> | 26 | #include <stdint.h> |
27 | 27 | ||
28 | #ifdef __cplusplus | ||
29 | extern "C" { | ||
30 | #endif | ||
31 | |||
28 | /* Ring buffer */ | 32 | /* Ring buffer */ |
29 | typedef struct RingBuffer RingBuffer; | 33 | typedef struct RingBuffer RingBuffer; |
30 | bool rb_full(const RingBuffer *b); | 34 | bool rb_full(const RingBuffer *b); |
@@ -36,4 +40,8 @@ void rb_kill(RingBuffer *b); | |||
36 | uint16_t rb_size(const RingBuffer *b); | 40 | uint16_t rb_size(const RingBuffer *b); |
37 | uint16_t rb_data(const RingBuffer *b, void **dest); | 41 | uint16_t rb_data(const RingBuffer *b, void **dest); |
38 | 42 | ||
43 | #ifdef __cplusplus | ||
44 | } | ||
45 | #endif | ||
46 | |||
39 | #endif /* RING_BUFFER_H */ | 47 | #endif /* RING_BUFFER_H */ |