Clean up allocator stuff into allocators.odin
This commit is contained in:
1 parent
e05315831f
commit
ecd7846ec3
8 files changed
+75
-76
No files matched your search
@@ -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