-
Notifications
You must be signed in to change notification settings - Fork 759
#590 - Renamed chooser to visitor and added function for parsed macro… #591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
You can test it in the |
src/lib.rs
Outdated
@@ -447,8 +447,8 @@ impl Builder { | |||
|
|||
/// Allows configuring types in different situations, see the `TypeChooser` | |||
/// documentation. | |||
pub fn type_chooser(mut self, cb: Box<chooser::TypeChooser>) -> Self { | |||
self.options.type_chooser = Some(cb); | |||
pub fn type_chooser(mut self, cb: Box<visitor::BindgenVisitor>) -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this not renamed too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Apologies for bike shedding, but I'm not in love with the name Spitting out anything that comes to mind:
Any other ideas? |
I'm liking onParse or ParseCallbacks, myself. |
ParseCallbacks SGTM |
bindgen-integration/build.rs
Outdated
|
||
#[derive(Debug)] | ||
struct MacroVisitor { | ||
macros: Arc<RwLock<HashSet<String>>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: indentation is off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
||
fn main() { | ||
gcc::Config::new() | ||
.cpp(true) | ||
.file("cpp/Test.cc") | ||
.compile("libtest.a"); | ||
|
||
let macros = Arc::new(RwLock::new(HashSet::new())); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra newline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
This looks fine to me renamed to |
Added tests and fixed missed function rename. Fixed nits Renamed visitor to callbacks. Renamed visitor to callbacks. Renamed visitor to callbacks. Fixed text.
Squashed! |
@bors-servo r+ Thanks! |
📌 Commit 7908561 has been approved by |
How would you suggest testing this?
☀️ Test successful - status-travis |
How would you suggest testing this?