diff options
Diffstat (limited to 'buffer.h')
-rw-r--r-- | buffer.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -7,11 +7,13 @@ TODO: Optimize small size buffers by using data and size members (16 bytes on x86) instead of heap allocation */ -typedef struct { + +typedef struct Buffer Buffer; +struct Buffer { void *data; size_t size; size_t capacity; -} Buffer; +}; void buffer_init(Buffer *self); void buffer_deinit(Buffer *self); |