-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for generating static inline wrappers
- Loading branch information
1 parent
0837553
commit 96e9355
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// SPDX-license-identifer: Apache-2.0 | ||
// Copyright © 2023 Red Hat, Inc | ||
|
||
#pragma once | ||
|
||
#include "other.h" | ||
|
||
int32_t add(const int32_t, const int32_t); | ||
|
||
static inline int32_t sub(const int32_t a, const int32_t b) { | ||
return a - b; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-license-identifer: Apache-2.0 | ||
// Copyright © 2023 Red Hat, Inc | ||
|
||
#![allow(non_upper_case_globals)] | ||
#![allow(non_camel_case_types)] | ||
#![allow(non_snake_case)] | ||
|
||
include!("header3.rs"); | ||
|
||
fn main() { | ||
unsafe { | ||
std::process::exit(add(0, sub(0, 0))); | ||
}; | ||
} |