mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
Add mem.reinterpret
This commit is contained in:
@@ -245,6 +245,10 @@ context_from_allocator :: proc(a: Allocator) -> type_of(context) {
|
|||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reinterpret :: proc($T: typeid, ptr: rawptr) -> (value: T) {
|
||||||
|
copy(&value, ptr, size_of(T));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Fixed_Byte_Buffer :: distinct [dynamic]byte;
|
Fixed_Byte_Buffer :: distinct [dynamic]byte;
|
||||||
|
|||||||
Reference in New Issue
Block a user