mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Auto stash before merge of "master" and "origin/master"
This commit is contained in:
@@ -42,6 +42,10 @@ ptr_to_bytes :: proc "contextless" (ptr: ^$T, len := 1) -> []byte {
|
|||||||
return transmute([]byte)raw.Slice{ptr, len*size_of(T)};
|
return transmute([]byte)raw.Slice{ptr, len*size_of(T)};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
any_to_bytes :: proc "contextless" (val: any) -> []byte {
|
||||||
|
return transmute([]byte)raw.Slice{val.data, val.type_info.size};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
kilobytes :: inline proc "contextless" (x: int) -> int do return (x) * 1024;
|
kilobytes :: inline proc "contextless" (x: int) -> int do return (x) * 1024;
|
||||||
megabytes :: inline proc "contextless" (x: int) -> int do return kilobytes(x) * 1024;
|
megabytes :: inline proc "contextless" (x: int) -> int do return kilobytes(x) * 1024;
|
||||||
|
|||||||
+1078
-1074
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user