mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
os: remove private unix_environ() helper function, it is not needed anymore (#15654)
This commit is contained in:
parent
0c84ad847e
commit
45e21bc311
1 changed files with 1 additions and 6 deletions
|
@ -79,11 +79,6 @@ pub fn unsetenv(name string) int {
|
|||
// See: https://docs.microsoft.com/bg-bg/windows/win32/api/processenv/nf-processenv-getenvironmentstrings
|
||||
// os.environ returns a map of all the current environment variables
|
||||
|
||||
fn unix_environ() &&char {
|
||||
// TODO: remove this helper function, when `&&char(C.environ)` works properly
|
||||
return voidptr(C.environ)
|
||||
}
|
||||
|
||||
pub fn environ() map[string]string {
|
||||
mut res := map[string]string{}
|
||||
$if windows {
|
||||
|
@ -101,7 +96,7 @@ pub fn environ() map[string]string {
|
|||
}
|
||||
C.FreeEnvironmentStringsW(estrings)
|
||||
} $else {
|
||||
start := unix_environ()
|
||||
start := &&char(C.environ)
|
||||
mut i := 0
|
||||
for {
|
||||
x := unsafe { start[i] }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue