Fix temp allocation on linux

This commit is contained in:
Brendan Punsky
2019-03-18 17:19:21 -04:00
committed by GitHub
parent 7426f3b092
commit b6ea7b7418

View File

@@ -23,7 +23,7 @@ null_term :: proc(str: string) -> string {
}
full :: proc(path: string, allocator := context.allocator) -> string {
full :: proc(path: string, allocator := context.temp_allocator) -> string {
cpath := strings.clone_to_cstring(path, context.temp_allocator);
foreign libc {
@@ -41,7 +41,7 @@ full :: proc(path: string, allocator := context.allocator) -> string {
return null_term(string(buf[:]));
}
current :: proc(allocator := context.allocator) -> string {
current :: proc(allocator := context.temp_allocator) -> string {
foreign libc{
getcwd :: proc(buf: ^u8, size: int) -> cstring ---;
}