mirror of
https://github.com/vlang/v.git
synced 2025-09-13 09:25:45 -04:00
cgen: fix myarr [1]C.mytype
fixed array fields, for pub type C.mytype = voidptr
(#21266)
This commit is contained in:
parent
dc763422c5
commit
9ed33718f3
@ -6570,9 +6570,6 @@ fn (mut g Gen) write_types(symbols []&ast.TypeSymbol) {
|
||||
}
|
||||
len := sym.info.size
|
||||
if len > 0 {
|
||||
if fixed_elem_name.starts_with('C__') {
|
||||
fixed_elem_name = fixed_elem_name[3..]
|
||||
}
|
||||
if elem_sym.info is ast.FnType {
|
||||
pos := g.out.len
|
||||
g.write_fn_ptr_decl(&elem_sym.info, '')
|
||||
|
9
vlib/v/tests/array_fixed_c_test.v
Normal file
9
vlib/v/tests/array_fixed_c_test.v
Normal file
@ -0,0 +1,9 @@
|
||||
type C.ArrFixedCTestType = voidptr
|
||||
|
||||
struct WrapperStruct {
|
||||
mut:
|
||||
arr_fixed_c_type [1]C.ArrFixedCTestType
|
||||
}
|
||||
|
||||
fn test_main() {
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user