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

Compiler complains of no LibC::Bool type #78

Closed
stakach opened this issue Nov 14, 2022 · 2 comments · Fixed by #79
Closed

Compiler complains of no LibC::Bool type #78

stakach opened this issue Nov 14, 2022 · 2 comments · Fixed by #79

Comments

@stakach
Copy link
Contributor

stakach commented Nov 14, 2022

The type is generated here:

when PrimitiveType::Kind::Bool,

This occurs on Debian Linux, not sure if LibC::Bool is missing for that platform in crystal or it's not something defined for any platform

@stakach
Copy link
Contributor Author

stakach commented Nov 17, 2022

ping @straight-shoota
would PrimitiveType::Kind::Bool align to something like LibC::SizeT

@straight-shoota
Copy link
Member

I think there is no dedicated bool type in classic C. It's just int.
That's why LibC::Bool doesn't exist for any platform (only on windows there's LibC::BOOL).

So PrimitiveType::Kind::Bool should probably map to LibC::Int.

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 a pull request may close this issue.

2 participants