mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-29 19:00:06 +00:00
Change precedence order for types e.g. ^T(x) == ^(T(x))
This commit is contained in:
+2
-2
@@ -2,14 +2,14 @@ import "mem.odin";
|
||||
|
||||
new_string :: proc(s: string) -> string {
|
||||
c := make([]u8, len(s)+1);
|
||||
copy(c, []u8(s));
|
||||
copy(c, cast([]u8)s);
|
||||
c[len(s)] = 0;
|
||||
return string(c[..len(s)]);
|
||||
}
|
||||
|
||||
new_c_string :: proc(s: string) -> ^u8 {
|
||||
c := make([]u8, len(s)+1);
|
||||
copy(c, []u8(s));
|
||||
copy(c, cast([]u8)s);
|
||||
c[len(s)] = 0;
|
||||
return &c[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user