diff options
Diffstat (limited to 'src/std/buffer.c')
-rw-r--r-- | src/std/buffer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/std/buffer.c b/src/std/buffer.c index e311c8f..dd7d0f6 100644 --- a/src/std/buffer.c +++ b/src/std/buffer.c @@ -2,6 +2,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <assert.h> void tsl_buffer_init(TslBuffer *self) { self->data = NULL; @@ -44,6 +45,11 @@ int tsl_buffer_append(TslBuffer *self, const void *data, size_t size) { return 1; } +void tsl_buffer_pop(TslBuffer *self, size_t size) { + assert(self->size >= size); + self->size -= size; +} + void* tsl_buffer_begin(TslBuffer *self) { return self->data; } |