spirv-reflect-rs icon indicating copy to clipboard operation
spirv-reflect-rs copied to clipboard

Fix incorrect cast for cross-platform support (specifically Windows)

Open Jefffrey opened this issue 2 years ago • 0 comments

size_t is defined as a c_ulong:

https://github.com/gwihlidal/spirv-reflect-rs/blob/62c41db8ae4fa732425ed843d8358b96f7d07155/gen/bindings.rs#L1615

Documentation of the type state that this type can vary between Linux and Windows:

This type will always be u32 or u64. Most notably, many Linux-based systems assume an u64, but Windows assumes u32.

Hence this is not working on Windows at the moment. This PR fixes this.

Jefffrey avatar Jun 26 '22 12:06 Jefffrey