cgen: fix myarr [1]C.mytype fixed array fields, for pub type C.mytype = voidptr (#21266)

This commit is contained in:
antono2 2024-04-24 05:46:02 +02:00 committed by GitHub
parent dc763422c5
commit 9ed33718f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -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, '')

View File

@ -0,0 +1,9 @@
type C.ArrFixedCTestType = voidptr
struct WrapperStruct {
mut:
arr_fixed_c_type [1]C.ArrFixedCTestType
}
fn test_main() {
}