aboutsummaryrefslogtreecommitdiff
path: root/include/std/buffer.h
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-04-25 23:32:23 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commit1b68fdcf5aebf2bc53bbd9234c77aea243c0decd (patch)
tree1a26f5b5ab32e6b435fa2afca789a5b846d11f46 /include/std/buffer.h
parent7f524c427597cc998f243769b0e22e4f450c55cf (diff)
Fix scoped allocator deinit crash with buffers
Diffstat (limited to 'include/std/buffer.h')
-rw-r--r--include/std/buffer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/std/buffer.h b/include/std/buffer.h
index aa82bcc..af6b986 100644
--- a/include/std/buffer.h
+++ b/include/std/buffer.h
@@ -12,6 +12,9 @@ typedef struct {
char* data;
usize size;
usize capacity;
+
+ ScopedAllocator *allocator;
+ usize allocator_index;
} Buffer;
CHECK_RESULT int buffer_init(Buffer *self, struct ScopedAllocator *allocator);