mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
Clean up allocator stuff into allocators.odin
This commit is contained in:
@@ -19,9 +19,9 @@ _lookup_env :: proc(key: string, allocator: runtime.Allocator) -> (value: string
|
||||
return "", true
|
||||
}
|
||||
|
||||
_TEMP_ALLOCATOR_GUARD()
|
||||
TEMP_ALLOCATOR_GUARD()
|
||||
|
||||
b := make([]u16, n+1, _temp_allocator())
|
||||
b := make([]u16, n+1, temp_allocator())
|
||||
|
||||
n = win32.GetEnvironmentVariableW(wkey, raw_data(b), u32(len(b)))
|
||||
if n == 0 {
|
||||
@@ -50,8 +50,8 @@ _unset_env :: proc(key: string) -> bool {
|
||||
}
|
||||
|
||||
_clear_env :: proc() {
|
||||
_TEMP_ALLOCATOR_GUARD()
|
||||
envs := environ(_temp_allocator())
|
||||
TEMP_ALLOCATOR_GUARD()
|
||||
envs := environ(temp_allocator())
|
||||
for env in envs {
|
||||
for j in 1..<len(env) {
|
||||
if env[j] == '=' {
|
||||
|
||||
Reference in New Issue
Block a user