rust-bindgen
rust-bindgen copied to clipboard
Generated name override
Addresses issue: https://github.com/rust-lang/rust-bindgen/issues/1375
- Adds
generated_name_overridecallback to theParseCallbackstrait. - Callback is invoked for each function name (after other name-related logic).
- Added test to verify.
This PR is a cleaned up version of previous: https://github.com/rust-lang/rust-bindgen/pull/2214
@justsmth I have one question. What happens if you use this new callback to set all the function names to the same value?
@justsmth I have one question. What happens if you use this new callback to set all the function names to the same value?
I've not tried that, but at best the bindings generated would not compile due to name conflicts. We could potentially detect/prevent such a mistake within rust-bindgen. However, I'm not sure doing so would be worth the added complexity.
:umbrella: The latest upstream changes (presumably #2284) made this pull request unmergeable. Please resolve the merge conflicts.