]>
git.proxmox.com Git - rustc.git/blob - vendor/libloading/src/test_helpers.rs
1 //! This is a separate file containing helpers for tests of this library. It is built into a
2 //! dynamic library by the build.rs script.
3 #![crate_type="cdylib"]
6 pub static mut TEST_STATIC_U32
: u32 = 0;
9 pub static mut TEST_STATIC_PTR
: *mut () = 0 as *mut _
;
12 pub extern "C" fn test_identity_u32(x
: u32) -> u32 {
25 pub extern "C" fn test_identity_struct(x
: S
) -> S
{
30 pub unsafe extern "C" fn test_get_static_u32() -> u32 {
35 pub unsafe extern "C" fn test_check_static_ptr() -> bool
{
36 TEST_STATIC_PTR
== (&mut TEST_STATIC_PTR
as *mut *mut _
as *mut _
)