mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
Add -disallow-rtti
This commit is contained in:
+12
-4
@@ -160,11 +160,19 @@ print_caller_location :: proc "contextless" (using loc: Source_Code_Location) {
|
||||
}
|
||||
}
|
||||
print_typeid :: proc "contextless" (id: typeid) {
|
||||
if id == nil {
|
||||
print_string("nil")
|
||||
when ODIN_DISALLOW_RTTI {
|
||||
if id == nil {
|
||||
print_string("nil")
|
||||
} else {
|
||||
print_string("<unknown type>")
|
||||
}
|
||||
} else {
|
||||
ti := type_info_of(id)
|
||||
print_type(ti)
|
||||
if id == nil {
|
||||
print_string("nil")
|
||||
} else {
|
||||
ti := type_info_of(id)
|
||||
print_type(ti)
|
||||
}
|
||||
}
|
||||
}
|
||||
print_type :: proc "contextless" (ti: ^Type_Info) {
|
||||
|
||||
Reference in New Issue
Block a user