aboutsummaryrefslogtreecommitdiff
path: root/src/std/buffer.c
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 /src/std/buffer.c
parent6927b6338b9655974db79c429e6ffc73037ab5e0 (diff)
Test errors, stop working on error
Diffstat (limited to 'src/std/buffer.c')
-rw-r--r--src/std/buffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/std/buffer.c b/src/std/buffer.c
index e631153..8e23a30 100644
--- a/src/std/buffer.c
+++ b/src/std/buffer.c
@@ -62,6 +62,10 @@ int buffer_pop(Buffer *self, void *data, usize size) {
return 0;
}
+void buffer_clear(Buffer *self) {
+ self->size = 0;
+}
+
void* buffer_start(Buffer *self) {
return self->data;
}