diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-03-06 14:16:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-06 14:16:22 +0100 |
commit | 185a5f322e973b60f8d0986672f9a88e5d9a07bd (patch) | |
tree | 4fa6d49cb0270b3e1c55ef27b74838f2a1569814 /src/ir/layout.rs | |
parent | 3a6864cf9a76916c002c41a8ae813d9f8bd9853e (diff) | |
parent | 9b6d0e84b432d95b3bfdf5a19b8abadde768489c (diff) |
Merge pull request #1531 from emilio/ref-layoutv0.48.1
Work around a libclang bug / limitation.
Diffstat (limited to 'src/ir/layout.rs')
-rw-r--r-- | src/ir/layout.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ir/layout.rs b/src/ir/layout.rs index c34da0e1..c70d2884 100644 --- a/src/ir/layout.rs +++ b/src/ir/layout.rs @@ -100,8 +100,8 @@ pub struct Opaque(pub Layout); impl Opaque { /// Construct a new opaque type from the given clang type. - pub fn from_clang_ty(ty: &clang::Type) -> Type { - let layout = Layout::new(ty.size(), ty.align()); + pub fn from_clang_ty(ty: &clang::Type, ctx: &BindgenContext) -> Type { + let layout = Layout::new(ty.size(ctx), ty.align(ctx)); let ty_kind = TypeKind::Opaque; let is_const = ty.is_const(); Type::new(None, Some(layout), ty_kind, is_const) |