Skip to content

Commit de90f88

Browse files
committed
Adjust output format
1 parent d6a9961 commit de90f88

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

bindgen/codegen/helpers.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -195,19 +195,13 @@ pub(crate) trait CppSemanticAttributeCreator {
195195
) {
196196
if let Some(location) = location {
197197
let (file, line, col, byte_offset) = location.location();
198+
let line = ast_ty::int_expr(line as i64);
199+
let col = ast_ty::int_expr(col as i64);
200+
let byte_offset = ast_ty::int_expr(byte_offset as i64);
198201
let file = file.name();
199202
if let Some(filename) = file {
200203
self.add(quote! {
201-
source_file(#filename)
202-
});
203-
self.add(quote! {
204-
source_col(#col)
205-
});
206-
self.add(quote! {
207-
source_line(#line)
208-
});
209-
self.add(quote! {
210-
byte_offset(#byte_offset)
204+
source_location(#filename, #line, #col, #byte_offset)
211205
});
212206
}
213207
}

0 commit comments

Comments
 (0)