Added in the cast function and fixed type promotion (so it would work with pointer arithmatic)
This commit is contained in:
1 parent
616b955bf9
commit
457998e0ff
7 files changed
+50
-4
No files matched your search
@@ -18,4 +18,11 @@ fun to_int<T>(in: T) : int {
|
||||
}
|
||||
return out;
|
||||
}
|
||||
fun cast<T,U>(in: T*):U* {
|
||||
var out:U*
|
||||
simple_passthrough(in:out:) """
|
||||
void* out = (void*)in;
|
||||
"""
|
||||
return out
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user