diff --git a/tests/expectations/tests/with_array_pointers_arguments.rs b/tests/expectations/tests/with_array_pointers_arguments.rs index eb3300e2dc..3808e18be4 100644 --- a/tests/expectations/tests/with_array_pointers_arguments.rs +++ b/tests/expectations/tests/with_array_pointers_arguments.rs @@ -8,14 +8,13 @@ )] extern "C" { - pub fn test_fn( - a: f32, - arr: *mut [::std::os::raw::c_int; 20usize], - ) -> ::std::os::raw::c_int; + 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; -} \ No newline at end of file + pub fn test_fn2(arr: *const [f32; 20usize], b: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +pub type defArr = [::std::os::raw::c_char; 20usize]; +pub type foo = ::std::option::Option; +extern "C" { + pub fn bar(a: *mut defArr); +} diff --git a/tests/expectations/tests/without_array_pointers_arguments.rs b/tests/expectations/tests/without_array_pointers_arguments.rs index a8d9990a41..b616893707 100644 --- a/tests/expectations/tests/without_array_pointers_arguments.rs +++ b/tests/expectations/tests/without_array_pointers_arguments.rs @@ -8,14 +8,13 @@ )] extern "C" { - pub fn test_fn( - a: f32, - arr: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + 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; -} \ No newline at end of file + pub fn test_fn2(arr: *const f32, b: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +pub type defArr = [::std::os::raw::c_char; 20usize]; +pub type foo = ::std::option::Option; +extern "C" { + pub fn bar(a: *mut ::std::os::raw::c_char); +} diff --git a/tests/headers/with_array_pointers_arguments.h b/tests/headers/with_array_pointers_arguments.h index 34f669d054..565b3cf678 100644 --- a/tests/headers/with_array_pointers_arguments.h +++ b/tests/headers/with_array_pointers_arguments.h @@ -2,4 +2,9 @@ int test_fn(float a, int arr[20]); -int test_fn2(const float arr[20], int b); \ No newline at end of file +int test_fn2(const float arr[20], int b); + +typedef char defArr[20]; +typedef void foo(defArr a); + +void bar(defArr a); \ No newline at end of file diff --git a/tests/headers/without_array_pointers_arguments.h b/tests/headers/without_array_pointers_arguments.h index 9028c43d5d..2f0668749b 100644 --- a/tests/headers/without_array_pointers_arguments.h +++ b/tests/headers/without_array_pointers_arguments.h @@ -1,4 +1,9 @@ int test_fn(float a, int arr[20]); -int test_fn2(const float arr[20], int b); \ No newline at end of file +int test_fn2(const float arr[20], int b); + +typedef char defArr[20]; +typedef void foo(defArr a); + +void bar(defArr a); \ No newline at end of file