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

Fix i8/u8 discrepancy for Language enum #196

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

DeltaF1
Copy link
Contributor

@DeltaF1 DeltaF1 commented Nov 8, 2024

Closes #195

@Meziu
Copy link
Member

Meziu commented Nov 8, 2024

Wouldn't it be better to change the #[repr()] for the enum rather than converting the values? That representation is made to directly translate the values for the C bindings, it's a bit weird to have them being different from libctru.

@DeltaF1
Copy link
Contributor Author

DeltaF1 commented Nov 8, 2024

Yeah that works too. I initially thought that changing the type might break things in other places, but I just tried it out (master...DeltaF1:ctru-rs:language_repr_2) and it builds fine so I guess nothing was depending on the repr.

@FenrirWolf FenrirWolf merged commit 786af2b into rust3ds:master Nov 10, 2024
4 checks passed
Adair-GA added a commit to Adair-GA/ctru-rs that referenced this pull request Nov 13, 2024
This reverts commit 786af2b, reversing
changes made to 4a15ec9.
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.

Mismatched types on language enum: expected u8, found i8
4 participants