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 hundreds of improper_ctypes warnings #72

Closed
wants to merge 1 commit into from
Closed

Fix hundreds of improper_ctypes warnings #72

wants to merge 1 commit into from

Conversation

Ameliorate
Copy link
Contributor

This does it by adding a 8 bit padding value to the lua_State struct.

These warnings, however, are still correct. The C spec does not account for zero sized structs. In C, structs that are empty still take up space, for the reason that two different variables will always have different addresses.

@tomaka
Copy link
Owner

tomaka commented Apr 14, 2016

The struct is only ever accessed by pointer, so in theory it's not a problem if it's zero-sized.
I'm not sure if your PR is the right fix to these warnings.

@Ameliorate
Copy link
Contributor Author

Ameliorate commented Apr 14, 2016 via email

@TyOverby
Copy link
Contributor

@Ameliorate Or a #[allow(improper_ctypes)] on the struct itself.

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.

3 participants