mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-08 00:28:49 +00:00
Remove TEMP_ALLOCATOR_GUARD wrapper
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user