Skip to content

fix: Don't use a macro to generate Action debug helper function #459

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

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

DataTriny
Copy link
Member

Relates to AccessKit/accesskit-c#8

We can't unfortunately use a macro when generating public types in the common crate: cbindgen will exclude them from the header file by default and telling it to expand the common crate is not possible AFAIK.

I've manually implemented a method similar to what the enumn crate would generate. The function which does the convertion from a mask to a list of actions doesn't rely on a manually provided upper bound, so the only place we would have to update if the enum change is the Action::n method. I don't think we can do better.

@mwcampbell mwcampbell merged commit ed1fb73 into main Oct 7, 2024
9 checks passed
@mwcampbell mwcampbell deleted the debug-action branch October 7, 2024 00:36
@github-actions github-actions bot mentioned this pull request Oct 1, 2024
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.

2 participants