#alias type declarations; core library additions; _global import name for the global scope

This commit is contained in:
gingerBill
2017-10-29 11:35:21 +00:00
parent 0ed34af19d
commit a43b89f36e
18 changed files with 367 additions and 49 deletions
+5 -5
View File
@@ -14,9 +14,9 @@ new_c_string :: proc(s: string) -> ^u8 {
return &c[0];
}
to_odin_string :: proc(c: ^u8) -> string {
if c == nil do return "";
len := 0;
for (c+len)^ != 0 do len+=1;
return string(mem.slice_ptr(c, len));
to_odin_string :: proc(str: ^u8) -> string {
if str == nil do return "";
end := str;
for end^ != 0 do end+=1;
return string(mem.slice_ptr(str, end-str));
}