mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-30 01:44:36 +00:00
Type caching
This commit is contained in:
@@ -22,7 +22,7 @@ enum HashKeyKind {
|
||||
|
||||
struct PtrAndId {
|
||||
void *ptr;
|
||||
u32 id;
|
||||
u64 id;
|
||||
};
|
||||
|
||||
struct HashKey {
|
||||
@@ -58,7 +58,7 @@ gb_inline HashKey hash_pointer(void *ptr) {
|
||||
h.ptr = ptr;
|
||||
return h;
|
||||
}
|
||||
gb_inline HashKey hash_ptr_and_id(void *ptr, u32 id) {
|
||||
gb_inline HashKey hash_ptr_and_id(void *ptr, u64 id) {
|
||||
HashKey h = {HashKey_PtrAndId};
|
||||
h.key = cast(u64)cast(uintptr)ptr;
|
||||
h.ptr_and_id.ptr = ptr;
|
||||
|
||||
Reference in New Issue
Block a user