aboutsummaryrefslogtreecommitdiff
path: root/include/std
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-03-31 13:44:27 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commit6a9466da5377d0bc73c7e5aa48deca3740d3de6f (patch)
tree87f4630f72fe77d037fe19d17bdc00618929f678 /include/std
parent6927b6338b9655974db79c429e6ffc73037ab5e0 (diff)
Test errors, stop working on error
Diffstat (limited to 'include/std')
-rw-r--r--include/std/buffer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/std/buffer.h b/include/std/buffer.h
index a1bfb01..723ef6c 100644
--- a/include/std/buffer.h
+++ b/include/std/buffer.h
@@ -20,6 +20,8 @@ CHECK_RESULT int buffer_init(Buffer *self, struct ScopedAllocator *allocator);
CHECK_RESULT int buffer_append(Buffer *self, const void *data, usize size);
void* buffer_get(Buffer *self, usize index, usize type_size);
CHECK_RESULT int buffer_pop(Buffer *self, void *data, usize size);
+/* Set buffer size to 0, doesn't reallocate */
+void buffer_clear(Buffer *self);
void* buffer_start(Buffer *self);
void* buffer_end(Buffer *self);
usize __buffer_get_size(Buffer *self, usize type_size);