Skip to content

Commit

Permalink
Merge pull request #33 from jessicah/cpp-linkage
Browse files Browse the repository at this point in the history
Specify linkage for `__test_fn...()`
  • Loading branch information
JohnTitor committed Apr 28, 2022
2 parents 6250d8c + 5684414 commit 2054b80
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1617,15 +1617,16 @@ impl<'a> Generator<'a> {
t!(writeln!(
self.c,
r#"
{ret} ({abi}*__test_fn_{name}(void))({args}) {{
{linkage} {ret} ({abi}*__test_fn_{name}(void))({args}) {{
return {c_name};
}}
"#,
name = name,
c_name = c_name,
args = args,
ret = c_ret,
abi = abi
abi = abi,
linkage = linkage(&self.opts.lang)
));
t!(writeln!(
self.rust,
Expand Down

0 comments on commit 2054b80

Please sign in to comment.