Minor changes to os2

This commit is contained in:
gingerBill
2024-02-17 13:41:54 +00:00
parent c5c2a4d09d
commit fa1875a8f1
5 changed files with 55 additions and 3 deletions
+4
View File
@@ -18,6 +18,9 @@ _lookup_env :: proc(key: string, allocator: runtime.Allocator) -> (value: string
}
return "", true
}
_TEMP_ALLOCATOR_GUARD()
b := make([]u16, n+1, _temp_allocator())
n = win32.GetEnvironmentVariableW(wkey, raw_data(b), u32(len(b)))
@@ -47,6 +50,7 @@ _unset_env :: proc(key: string) -> bool {
}
_clear_env :: proc() {
_TEMP_ALLOCATOR_GUARD()
envs := environ(_temp_allocator())
for env in envs {
for j in 1..<len(env) {