43 lines
895 B
Plaintext
43 lines
895 B
Plaintext
use super::*;
|
|
// Section: wire functions
|
|
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn wire_add(port_: i64,left: usize,right: usize) {
|
|
wire_add_impl(port_,left,right)
|
|
}
|
|
|
|
// Section: allocate functions
|
|
|
|
|
|
// Section: related functions
|
|
|
|
|
|
// Section: impl Wire2Api
|
|
|
|
|
|
// Section: wire structs
|
|
|
|
|
|
|
|
// Section: impl NewWithNullPtr
|
|
|
|
pub trait NewWithNullPtr {
|
|
fn new_with_null_ptr() -> Self;
|
|
}
|
|
|
|
impl<T> NewWithNullPtr for *mut T {
|
|
fn new_with_null_ptr() -> Self {
|
|
std::ptr::null_mut()
|
|
}
|
|
}
|
|
|
|
|
|
// Section: sync execution mode utility
|
|
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn free_WireSyncReturn(ptr: support::WireSyncReturn) {
|
|
unsafe { let _ = support::box_from_leak_ptr(ptr); };
|
|
}
|
|
|