diff options
Diffstat (limited to 'src/std')
-rw-r--r-- | src/std/buffer.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/std/buffer.c b/src/std/buffer.c index c4c9845..1fdcfd4 100644 --- a/src/std/buffer.c +++ b/src/std/buffer.c @@ -60,3 +60,16 @@ int buffer_pop(Buffer *self, void *data, usize size) { self->size -= size; return 0; } + +void* buffer_start(Buffer *self) { + return self->data; +} + +void *buffer_end(Buffer *self) { + return self->data + self->size; +} + +usize __buffer_get_size(Buffer *self, usize type_size) { + assert(type_size != 0); + return self->size / type_size; +}
\ No newline at end of file |