Bindgen #define with cast
⚓ Rust 📅 2025-10-04 👤 surdeus 👁️ 5Hello,
I am using bindgen in my project for a c source code. I am encountering difficulties with the different #define.
So this #define is not generated:
#define MY_DEFINE    ((int) 'c')
whereas this #define is generated:
#define MY_DEFINE 'c'
I am under the impression that the casting prevents bindgen from generating the equivalent rust code.
Is this intended or a bug ? Is there a workaround ?
Thank you very much in advance for any help
1 post - 1 participant
🏷️ Rust_feed