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

checker: fix error for cast to alias of reference struct (#13278)

This commit is contained in:
yuyi
2022-01-26 18:32:14 +08:00
committed by GitHub
parent 867056dafb
commit d71fc0d13f
3 changed files with 19 additions and 2 deletions

View File

@@ -88,7 +88,7 @@ pub fn open(name string, level CompressionLevel, mode OpenMode) ?&Zip {
if name.len == 0 {
return error('szip: name of file empty')
}
p_zip := &Zip(C.zip_open(&char(name.str), int(level), char(mode.to_byte())))
p_zip := unsafe { &Zip(C.zip_open(&char(name.str), int(level), char(mode.to_byte()))) }
if isnil(p_zip) {
return error('szip: cannot open/create/append new zip archive')
}