new, new_slice, delete

This commit is contained in:
Ginger Bill
2016-08-28 01:06:42 +01:00
parent ae75ab169b
commit 593563d8ea
8 changed files with 348 additions and 140 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ win32_print_last_error :: proc() {
to_c_string :: proc(s: string) -> ^u8 {
c_str: ^u8 = alloc(len(s)+1);
memory_copy(c_str, ^s[0], len(s));
c_str[len(s)] = 0;
ptr_offset(c_str, len(s))^ = 0;
return c_str;
}