diff --git a/core/mem/mem.odin b/core/mem/mem.odin index ecf232557..aaea98437 100644 --- a/core/mem/mem.odin +++ b/core/mem/mem.odin @@ -245,6 +245,10 @@ context_from_allocator :: proc(a: Allocator) -> type_of(context) { return context; } +reinterpret :: proc($T: typeid, ptr: rawptr) -> (value: T) { + copy(&value, ptr, size_of(T)); + return; +} Fixed_Byte_Buffer :: distinct [dynamic]byte;