-
Notifications
You must be signed in to change notification settings - Fork 707
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* automatically generated by rust-bindgen */ | ||
|
||
#![allow( | ||
dead_code, | ||
non_snake_case, | ||
non_camel_case_types, | ||
non_upper_case_globals | ||
)] | ||
|
||
extern "C" { | ||
pub fn test_fn( | ||
a: f32, | ||
arr: *mut [::std::os::raw::c_int; 20usize], | ||
) -> ::std::os::raw::c_int; | ||
} | ||
extern "C" { | ||
pub fn test_fn2( | ||
arr: *const [f32; 20usize], | ||
b: ::std::os::raw::c_int, | ||
) -> ::std::os::raw::c_int; | ||
} |
21 changes: 21 additions & 0 deletions
21
tests/expectations/tests/without_array_pointers_arguments.rs
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,21 @@ | ||
/* automatically generated by rust-bindgen */ | ||
|
||
#![allow( | ||
dead_code, | ||
non_snake_case, | ||
non_camel_case_types, | ||
non_upper_case_globals | ||
)] | ||
|
||
extern "C" { | ||
pub fn test_fn( | ||
a: f32, | ||
arr: *mut ::std::os::raw::c_int, | ||
) -> ::std::os::raw::c_int; | ||
} | ||
extern "C" { | ||
pub fn test_fn2( | ||
arr: *const f32, | ||
b: ::std::os::raw::c_int, | ||
) -> ::std::os::raw::c_int; | ||
} |
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,5 @@ | ||
// bindgen-flags: --use-array-pointers-in-arguments | ||
|
||
int test_fn(float a, int arr[20]); | ||
|
||
int test_fn2(const float arr[20], int 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,4 @@ | ||
|
||
int test_fn(float a, int arr[20]); | ||
|
||
int test_fn2(const float arr[20], int b); |