rust-bindgen icon indicating copy to clipboard operation
rust-bindgen copied to clipboard

Pass the kind of item to `ParseCallbacks::item_name`

Open kupiakos opened this issue 1 year ago • 1 comments

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

kupiakos avatar Jan 26 '24 23:01 kupiakos

Seems sensible.

emilio avatar Feb 04 '24 12:02 emilio