mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vlib: add [unsafe] tag to more functions: tos, string_from_wide, strings.Builder: write_bytes, free (#8766)
This commit is contained in:
@@ -72,7 +72,7 @@ pub fn environ() map[string]string {
|
||||
mut estrings := C.GetEnvironmentStringsW()
|
||||
mut eline := ''
|
||||
for c := estrings; *c != 0; {
|
||||
eline = string_from_wide(c)
|
||||
eline = unsafe { string_from_wide(c) }
|
||||
eq_index := eline.index_byte(`=`)
|
||||
if eq_index > 0 {
|
||||
res[eline[0..eq_index]] = eline[eq_index + 1..]
|
||||
|
Reference in New Issue
Block a user