Remove TEMP_ALLOCATOR_GUARD wrapper

This commit is contained in:
Lucas Perlind
2025-05-08 17:41:03 +10:00
parent 5292a7f4f3
commit 9f2d008a8a
33 changed files with 113 additions and 116 deletions
+2 -2
View File
@@ -47,7 +47,7 @@ _fstat_internal :: proc(fd: linux.Fd, allocator: runtime.Allocator) -> (fi: File
// NOTE: _stat and _lstat are using _fstat to avoid a race condition when populating fullpath
_stat :: proc(name: string, allocator: runtime.Allocator) -> (fi: File_Info, err: Error) {
temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({ allocator }))
temp_allocator := TEMP_ALLOCATOR_GUARD({ allocator })
name_cstr := clone_to_cstring(name, temp_allocator) or_return
fd, errno := linux.open(name_cstr, {})
@@ -59,7 +59,7 @@ _stat :: proc(name: string, allocator: runtime.Allocator) -> (fi: File_Info, err
}
_lstat :: proc(name: string, allocator: runtime.Allocator) -> (fi: File_Info, err: Error) {
temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({ allocator }))
temp_allocator := TEMP_ALLOCATOR_GUARD({ allocator })
name_cstr := clone_to_cstring(name, temp_allocator) or_return
fd, errno := linux.open(name_cstr, {.PATH, .NOFOLLOW})