Sha256: 201403e143e5b3204864124cd38067cf8813d5273dc1a9099288a9dc4bdd15b6

Contents?: true

Size: 747 Bytes

Versions: 38

Compression:

Stored size: 747 Bytes

Contents

//! This is a separate file containing helpers for tests of this library. It is built into a
//! dynamic library by the build.rs script.
#![crate_type="cdylib"]

#[no_mangle]
pub static mut TEST_STATIC_U32: u32 = 0;

#[no_mangle]
pub static mut TEST_STATIC_PTR: *mut () = 0 as *mut _;

#[no_mangle]
pub extern "C" fn test_identity_u32(x: u32) -> u32 {
    x
}

#[repr(C)]
pub struct S {
    a: u64,
    b: u32,
    c: u16,
    d: u8
}

#[no_mangle]
pub extern "C" fn test_identity_struct(x: S) -> S {
    x
}

#[no_mangle]
pub unsafe extern "C" fn test_get_static_u32() -> u32 {
    TEST_STATIC_U32
}

#[no_mangle]
pub unsafe extern "C" fn test_check_static_ptr() -> bool {
    TEST_STATIC_PTR == (&mut TEST_STATIC_PTR as *mut *mut _ as *mut _)
}

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/libloading-0.8.6/src/test_helpers.rs
wasmtime-28.0.0 ./ext/cargo-vendor/libloading-0.8.6/src/test_helpers.rs
wasmtime-27.0.0 ./ext/cargo-vendor/libloading-0.8.5/src/test_helpers.rs
wasmtime-26.0.0 ./ext/cargo-vendor/libloading-0.8.5/src/test_helpers.rs
wasmtime-25.0.2 ./ext/cargo-vendor/libloading-0.8.5/src/test_helpers.rs
wasmtime-25.0.1 ./ext/cargo-vendor/libloading-0.8.5/src/test_helpers.rs
wasmtime-25.0.0 ./ext/cargo-vendor/libloading-0.8.5/src/test_helpers.rs
wasmtime-24.0.0 ./ext/cargo-vendor/libloading-0.8.5/src/test_helpers.rs
wasmtime-23.0.2 ./ext/cargo-vendor/libloading-0.8.1/src/test_helpers.rs
wasmtime-22.0.0 ./ext/cargo-vendor/libloading-0.8.1/src/test_helpers.rs
wasmtime-21.0.1 ./ext/cargo-vendor/libloading-0.8.1/src/test_helpers.rs
wasmtime-20.0.2 ./ext/cargo-vendor/libloading-0.8.1/src/test_helpers.rs
wasmtime-20.0.0 ./ext/cargo-vendor/libloading-0.8.1/src/test_helpers.rs
wasmtime-18.0.3 ./ext/cargo-vendor/libloading-0.8.1/src/test_helpers.rs
wasmtime-17.0.1 ./ext/cargo-vendor/libloading-0.8.1/src/test_helpers.rs
wasmtime-17.0.0 ./ext/cargo-vendor/libloading-0.8.1/src/test_helpers.rs
wasmtime-16.0.0 ./ext/cargo-vendor/libloading-0.8.1/src/test_helpers.rs
wasmtime-15.0.1 ./ext/cargo-vendor/libloading-0.8.1/src/test_helpers.rs
wasmtime-15.0.0 ./ext/cargo-vendor/libloading-0.8.1/src/test_helpers.rs
wasmtime-14.0.4 ./ext/cargo-vendor/libloading-0.7.4/src/test_helpers.rs