Skip to content

Commit

Permalink
push in_data only when not substituted already
Browse files Browse the repository at this point in the history
  • Loading branch information
Medowhill committed Aug 2, 2024
1 parent cbd8f12 commit e01b5ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/translation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1769,7 +1769,9 @@ impl<'ast> Translator<'ast> {
let mut vec = self.make_replace_vec(Some(tdeps), Some(deps), Some(callees));
let in_spans = c_parser::find_names(func.definition, "in");
for span in in_spans {
vec.push((span, "in_data"));
if !vec.iter().any(|(s, _)| *s == span) {
vec.push((span, "in_data"));
}
}
vec.push((func.identifier.span, new_name));
let code = self.program.function_to_string(func, vec.clone());
Expand Down

0 comments on commit e01b5ce

Please sign in to comment.