Skip to content

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