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
+4 -4
View File
@@ -45,7 +45,7 @@ full_path_from_name :: proc(name: string, allocator: runtime.Allocator) -> (path
name = "."
}
temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({ allocator }))
temp_allocator := TEMP_ALLOCATOR_GUARD({ allocator })
p := win32_utf8_to_utf16(name, temp_allocator) or_return
@@ -65,7 +65,7 @@ internal_stat :: proc(name: string, create_file_attributes: u32, allocator: runt
if len(name) == 0 {
return {}, .Not_Exist
}
temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({ allocator }))
temp_allocator := TEMP_ALLOCATOR_GUARD({ allocator })
wname := _fix_long_path(name, temp_allocator) or_return
fa: win32.WIN32_FILE_ATTRIBUTE_DATA
@@ -137,7 +137,7 @@ _cleanpath_from_handle :: proc(f: ^File, allocator: runtime.Allocator) -> (strin
return "", _get_platform_error()
}
temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({ allocator }))
temp_allocator := TEMP_ALLOCATOR_GUARD({ allocator })
buf := make([]u16, max(n, 260)+1, temp_allocator)
n = win32.GetFinalPathNameByHandleW(h, raw_data(buf), u32(len(buf)), 0)
@@ -155,7 +155,7 @@ _cleanpath_from_handle_u16 :: proc(f: ^File) -> ([]u16, Error) {
return nil, _get_platform_error()
}
temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({}))
temp_allocator := TEMP_ALLOCATOR_GUARD({})
buf := make([]u16, max(n, 260)+1, temp_allocator)
n = win32.GetFinalPathNameByHandleW(h, raw_data(buf), u32(len(buf)), 0)