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

Wrap VCL_BOOL in a struct to ensure type safety #52

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

nyurik
Copy link
Collaborator

@nyurik nyurik commented Sep 6, 2024

Introduce a wrapper for VCL_BOOL type, per #51

Open Questions

  • Do we actually need Deref and DerefMut implementations for it? It can be simplified to struct VCL_BOOL(pub c_uint);
  • probe.exp_status = self.exp_status.into_vcl(ws)? and 2 more no longer work because it seem they were silently using int to bool conversion?
  • Seems like it is no longer needs to use vcl_types!?

@nyurik nyurik force-pushed the gen-types-bool branch 5 times, most recently from 2126e36 to fbaf072 Compare September 11, 2024 06:08
@nyurik nyurik marked this pull request as ready for review September 11, 2024 06:57
@nyurik nyurik changed the title Try wrapped bool type conversion Wrap VCL_BOOL in a struct to ensure type safety Sep 11, 2024
wip

Cleaned up boilerplate
@gquintard gquintard merged commit b5df3da into gquintard:main Sep 13, 2024
2 checks passed
@nyurik nyurik deleted the gen-types-bool branch September 13, 2024 00:24
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