From 81b6004928015ced29b0b949e35753977aa17606 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 5 Mar 2019 18:25:57 +0100 Subject: Add ast resolving using multiple threads Fix issue where not all files are parsed --- src/std/buffer.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/std/buffer.c') 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 -- cgit v1.2.3