Skip to content
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

Use repr(transparent) for single element structs #187

Merged
merged 1 commit into from
Feb 15, 2019

Conversation

CryZe
Copy link
Contributor

@CryZe CryZe commented Feb 15, 2019

The ABI of aggregates such as single element structs is not required to be the same as the single elements themselves. This is especially true for f64 vs. #[repr(c)] struct F(f64); on Windows. Therefore the macro has been tweaked so S1 uses repr(transparent) which is made for exactly for this use case.

Closes #183

The ABI of aggregates such as single element structs is not required to
be the same as the single elements themselves. This is especially true
for f64 vs. #[repr(c)] struct F(f64); on Windows. Therefore the macro
has been tweaked so S1 uses repr(transparent) which is made for exactly
for this use case.

Closes wasmerio#183
@CryZe
Copy link
Contributor Author

CryZe commented Feb 15, 2019

I didn't add any tests yet, if you want I can possibly add some.

@xmclark
Copy link
Contributor

xmclark commented Feb 15, 2019

I think the existing tests are enough. Great work!

@xmclark xmclark merged commit cb29261 into wasmerio:master Feb 15, 2019
@xmclark
Copy link
Contributor

xmclark commented Feb 15, 2019

Good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants