Skip to content

Commit b9c6984

Browse files
igeladoemilio
authored andcommitted
Use callbacks properly
1 parent 803d73e commit b9c6984

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bindgen/ir/var.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,10 @@ fn parse_macro(
427427
) -> Option<(Vec<u8>, cexpr::expr::EvalResult)> {
428428
use cexpr::expr;
429429

430-
let cexpr_tokens = cursor.cexpr_tokens();
430+
let mut cexpr_tokens = cursor.cexpr_tokens();
431431

432-
if let Some(callbacks) = ctx.options.parse_callbacks() {
433-
callbacks.modify_macro(cursor.spelling(), &mut cexpr_tokens);
432+
for callbacks in &ctx.options().parse_callbacks {
433+
callbacks.modify_macro(&cursor.spelling(), &mut cexpr_tokens);
434434
}
435435

436436
let parser = expr::IdentifierParser::new(ctx.parsed_macros());

0 commit comments

Comments
 (0)