Skip to content

Commit ba9298d

Browse files
committed
Test.
1 parent 4d2ba9d commit ba9298d

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/expectations/tests/issue-833.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
4+
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
5+
6+
#[repr(C)] pub struct nsTArray<T> { pub hdr: *const T }
7+
8+
extern "C" {
9+
pub fn func() -> *mut nsTArray<::std::os::raw::c_int>;
10+
}

tests/headers/issue-833.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// bindgen-flags: --generate functions --whitelist-function func --raw-line "#[repr(C)] pub struct nsTArray<T> { pub hdr: *const T }"
2+
3+
template<typename T>
4+
class nsTArray {
5+
T* mHeader;
6+
};
7+
8+
extern "C" nsTArray<int>* func();

0 commit comments

Comments
 (0)