mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Fix temp allocation on linux
This commit is contained in:
@@ -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);
|
cpath := strings.clone_to_cstring(path, context.temp_allocator);
|
||||||
|
|
||||||
foreign libc {
|
foreign libc {
|
||||||
@@ -41,7 +41,7 @@ full :: proc(path: string, allocator := context.allocator) -> string {
|
|||||||
return null_term(string(buf[:]));
|
return null_term(string(buf[:]));
|
||||||
}
|
}
|
||||||
|
|
||||||
current :: proc(allocator := context.allocator) -> string {
|
current :: proc(allocator := context.temp_allocator) -> string {
|
||||||
foreign libc{
|
foreign libc{
|
||||||
getcwd :: proc(buf: ^u8, size: int) -> cstring ---;
|
getcwd :: proc(buf: ^u8, size: int) -> cstring ---;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user