Introduce the allocator stuff again

This commit is contained in:
Krzosa Karol
2022-12-31 16:51:01 +01:00
parent e20edaa3a2
commit 55515ff420
12 changed files with 71 additions and 44 deletions

View File

@@ -13,6 +13,15 @@ struct Ast_Expr;
#ifndef CORE_BASE
#define CORE_BASE
struct Allocator {
typedef void *Allocate(Allocator *, size_t);
typedef void Deallocate(Allocator *, void *p);
Allocate *allocate;
Deallocate *deallocate;
};
struct String{
uint8_t *str;
int64_t len;