map is internally backed by a pointer (i.e. a "reference type")

This commit is contained in:
gingerBill
2017-12-17 19:25:35 +00:00
parent 30530d058c
commit a69ea58388
7 changed files with 161 additions and 98 deletions
+5 -1
View File
@@ -20,11 +20,15 @@ Dynamic_Array :: struct {
allocator: Allocator,
}
Map :: struct {
Map_Internal :: struct {
hashes: [dynamic]int,
entries: Dynamic_Array,
}
Map :: struct {
using internal: ^Map_Internal,
}
make_any :: inline proc(data: rawptr, type_info: ^Type_Info) -> any {
return transmute(any)Any{data, type_info};
}