tidwall / neco

Concurrency library for C (coroutines)
MIT License
1.1k stars 79 forks source link

fixes alignment on opaque types as discueed with @tidwall #13

Closed deckarep closed 3 months ago

deckarep commented 3 months ago

Please do not open a pull request without first filing an issue and/or discussing the feature directly with me.

Please ensure you adhere to every item in this list

Describe your changes

Please provide detailed description of the changes.

When using this library from Zig, the Zig compiler caught some undefined behavior with respect to the opaque types. The fix as discussed with @tidwall was to override the default alignment on the exported opaque types and added the necessary static_assert checks to the internal types such that they match.

https://github.com/tidwall/neco/issues/11

tidwall commented 3 months ago

Thanks!