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

BOOL.Value should be typed as int #186

Closed
AArnott opened this issue Mar 10, 2021 · 2 comments
Closed

BOOL.Value should be typed as int #186

AArnott opened this issue Mar 10, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@AArnott
Copy link
Member

AArnott commented Mar 10, 2021

Perhaps unbelievably, it has come to my attention that some BOOL types carry more than just a binary zero/non-zero state. We should expose this in CsWin32 rather than hide it by only exposing it as bool.

@AArnott AArnott added the enhancement New feature or request label Mar 10, 2021
@jnm2
Copy link
Contributor

jnm2 commented Mar 10, 2021

Side note in case it's interesting :D C#'s bool carries more than just a binary state, too. The fact that it's actually eight bits can be observed this way: dotnet/csharplang#544 (comment)
Or this way: dotnet/csharplang#544 (comment)

@AArnott
Copy link
Member Author

AArnott commented Mar 11, 2021

Funny. Well, BOOL is 4 bytes, so bool just doesn't quite cut it, theoretically.

@AArnott AArnott self-assigned this Mar 16, 2021
AArnott added a commit that referenced this issue Mar 16, 2021
Also adds supports for BOOL constants.

Closes #186
AArnott added a commit that referenced this issue Mar 16, 2021
Also adds supports for BOOL constants.

Closes #186
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants