Skip to content

Commit

Permalink
Fix const array issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rsammelson committed Nov 15, 2023
1 parent 4f9fa49 commit 41a0e58
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 18 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 9 additions & 12 deletions bindgen-tests/tests/expectations/tests/struct_typedef_ns.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion bindgen/codegen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5260,7 +5260,8 @@ pub(crate) mod utils {
} else {
t.to_rust_ty_or_opaque(ctx, &())
};
stream.to_ptr(ctx.resolve_type(t).is_const())
stream
.to_ptr(ctx.resolve_type(t).is_const() || arg_ty.is_const())
}
TypeKind::Pointer(inner) => {
let inner = ctx.resolve_item(inner);
Expand Down

0 comments on commit 41a0e58

Please sign in to comment.