v
v copied to clipboard
Passing a voidptr causes type conflict
Input:
fn main() {
a := voidptr('AAAAAAAA'.str)
b := ptr_str(a)
println(b)
}
Output:
Fn "ptr_str" wrong arg #1. Expected "void*" (ptr) but got "voidptr"
Any function with a parameter of type voidptr produces that error.
Fixed:
voidptr can only be used in unsafe code