Skip to content

Commit

Permalink
Don't escape objective-c method names
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdrz committed Sep 25, 2023
1 parent 4f8709f commit 401735a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bindgen/ir/objc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,12 @@ impl ObjCMethod {
let split_name: Vec<Option<Ident>> = self
.name
.split(':')
.map(|name| {
.enumerate()
.map(|(idx, name)| {
if name.is_empty() {
None
} else if idx == 0 {
Some(Ident::new(name, Span::call_site()))
} else {
// Try to parse the current name as an identifier. This might fail if the name
// is a keyword, so we try to "r#" to it and parse again, this could also fail
Expand Down

0 comments on commit 401735a

Please sign in to comment.