rust-lang / rust-lang/rust-bindgen
Pass the kind of item to `ParseCallbacks::item_name`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 829
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
Input C/C++ Header
enum long_prefix_to_remove_foo {
BAR = 0
};
int long_prefix_to_remove_bar();
There is no way to implement ParseCallbacks::item_name that can follow different naming logic for these two items.
I propose that item_name be refactored to look more like generated_name_override, which passes in an info struct instead of solely a name.
Cc @vsukhoml
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ParseCallbacks::item_name API and compare its signature and inputs with generated_name_override, following the callback implementation and callers. Done means the callback receives enough item information to apply different naming logic to the enum and function shown, while preserving existing callback behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100