1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

array, map: cast voidptr to byteptr

This commit is contained in:
Alexey
2020-04-02 16:31:44 +03:00
committed by GitHub
parent d4df916581
commit 01aa2b86f5
4 changed files with 19 additions and 19 deletions

View File

@@ -175,7 +175,7 @@ fn new_map(n, value_bytes int) map {
fn new_map_init(n, value_bytes int, keys &string, values voidptr) map {
mut out := new_map(n, value_bytes)
for i in 0 .. n {
out.set(keys[i], values + i * value_bytes)
out.set(keys[i], byteptr(values) + i * value_bytes)
}
return out
}