Safety commit
This commit is contained in:
@@ -132,6 +132,10 @@ Type *type_pointer_wrap(Type *t) {
|
||||
return (Type*) ret;
|
||||
}
|
||||
|
||||
int type_is_number(Type *t) {
|
||||
return t->type == TYPE_TYPE_POINTER || t->type == TYPE_TYPE_PRIMITIVE;
|
||||
}
|
||||
|
||||
int type_is_castable(Type *from, Type *to) {
|
||||
if(type_equal(from, to)) return 2;
|
||||
|
||||
@@ -152,4 +156,4 @@ int type_is_castable(Type *from, Type *to) {
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user