mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
typeid as keyword (ready to implement polymorphic name parameters)
This commit is contained in:
+1
-1
@@ -111,7 +111,7 @@ ptr_to_bytes :: proc "contextless" (ptr: ^$T, len := 1) -> []byte {
|
||||
}
|
||||
|
||||
any_to_bytes :: proc "contextless" (val: any) -> []byte {
|
||||
ti := type_info_of(val.typeid);
|
||||
ti := type_info_of(val.id);
|
||||
size := ti != nil ? ti.size : 0;
|
||||
return transmute([]byte)Raw_Slice{val.data, size};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user