mirror of
https://github.com/vlang/v.git
synced 2025-08-03 17:57:59 -04:00
os: fix documentation for environ function (#24796)
This commit is contained in:
parent
a5ece523e2
commit
cf698066db
@ -81,14 +81,13 @@ pub fn unsetenv(name string) int {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// See: https://linux.die.net/man/5/environ for unix platforms.
|
|
||||||
// See: https://docs.microsoft.com/bg-bg/windows/win32/api/processenv/nf-processenv-getenvironmentstrings
|
|
||||||
// environ returns a map of all the current environment variables.
|
// environ returns a map of all the current environment variables.
|
||||||
|
// See: https://linux.die.net/man/5/environ for Unix platforms.
|
||||||
// TODO how to declare Virtual C globals?
|
// See: https://docs.microsoft.com/bg-bg/windows/win32/api/processenv/nf-processenv-getenvironmentstrings
|
||||||
// const C.environ &&char
|
// for Windows OS.
|
||||||
|
|
||||||
pub fn environ() map[string]string {
|
pub fn environ() map[string]string {
|
||||||
|
// TODO how to declare Virtual C globals?
|
||||||
|
// const C.environ &&char
|
||||||
mut res := map[string]string{}
|
mut res := map[string]string{}
|
||||||
$if windows {
|
$if windows {
|
||||||
mut estrings := C.GetEnvironmentStringsW()
|
mut estrings := C.GetEnvironmentStringsW()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user