mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: warn when casting number or a voidptr to reference type outside unsafe (#7900)
This commit is contained in:
@@ -81,7 +81,7 @@ pub fn environ() map[string]string {
|
||||
}
|
||||
C.FreeEnvironmentStringsW(estrings)
|
||||
} $else {
|
||||
e := &charptr(C.environ)
|
||||
e := unsafe { &charptr(C.environ) }
|
||||
for i := 0; !isnil(unsafe { e[i] }); i++ {
|
||||
eline := unsafe { cstring_to_vstring(byteptr(e[i])) }
|
||||
eq_index := eline.index_byte(`=`)
|
||||
|
||||
Reference in New Issue
Block a user