-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_intoFFI padding #656
Comments
Or the previous set of types, Also the example was incorrect, |
Nope, it pads with an |
This fixes rust-diplomat#656 but not rust-diplomat#657 The scalarpair struct part of the second test happens to pass since rust-diplomat#657 is only relevant for argument passing
Should double check with LLVM output, but basically:
Pads with
2 x i8
s. ButPads with
1 x i16
. The padding is determined by the previous type, and then it all gets converted intoi32
s for WASM, regardless of how much sense that makes.So, the fix should go in
generate_fields
, to grab what the previous field's align is. Then update the padding to be use something like(next_offset - curr_offset - field_layout.size()) / previous_align
The text was updated successfully, but these errors were encountered: