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(ext/ffi): Fix usize and isize FFI callback parameters missing match arm #16172

Conversation

aapoalas
Copy link
Collaborator

@aapoalas aapoalas commented Oct 6, 2022

Mea culpa. Back when I re-introduced parameter and return value types to FFI callbacks I failed to properly account for the change in match arm logic. As a result, usize and isize parameters in FFI callbacks currently enter the branch meant for void only.

This PR changes the match arms to all be explicit, making sure that void is the only arm marked unreachable and that it stays that way.

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@littledivy littledivy merged commit 19e4e82 into denoland:main Oct 7, 2022
@aapoalas aapoalas deleted the bugfix/ext-ffi/usize-isize-callback-parameters branch October 9, 2022 08:00
bartlomieju pushed a commit that referenced this pull request Oct 17, 2022
…ch arm (#16172)

Mea culpa. Back when I re-introduced parameter and return value types to
FFI callbacks I failed to properly account for the change in match arm
logic. As a result, usize and isize parameters in FFI callbacks
currently enter the branch meant for void only.

This PR changes the match arms to all be explicit, making sure that void
is the only arm marked unreachable and that it stays that way.
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