change cast to cast_ptr, take in ptr types

This commit is contained in:
Nathan Braswell
2015-06-28 21:26:13 -04:00
parent d0223c41b3
commit b81abee459
2 changed files with 4 additions and 4 deletions

View File

@@ -18,10 +18,10 @@ fun to_int<T>(in: T) : int {
}
return out;
}
fun cast<T,U>(in: T*):U* {
var out:U*
fun cast_ptr<T,U>(in: T):U {
var out:U
simple_passthrough(in:out:) """
void* out = (void*)in;
void* out = in;
"""
return out
}