typeid as keyword (ready to implement polymorphic name parameters)

This commit is contained in:
gingerBill
2018-09-02 15:56:36 +01:00
parent eb274cf316
commit 220485a2d2
16 changed files with 275 additions and 88 deletions
+1 -1
View File
@@ -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};
}
+2 -2
View File
@@ -1,8 +1,8 @@
package mem
Raw_Any :: struct {
data: rawptr,
typeid: typeid,
data: rawptr,
id: typeid,
}
Raw_String :: struct {