-//! Contains simple structs describing parts of transactions on the chain.
+//! Types describing on-chain transactions.
use std::ffi::c_void;
use bitcoin::hashes::Hash;
#[must_use]
#[repr(C)]
pub struct OutPoint {
- /// Nearly everyhwere, inner must be non-null, however in places where
+ /// Nearly everywhere, inner must be non-null, however in places where
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
pub inner: *mut nativeOutPoint,
pub is_owned: bool,
pub(crate) extern "C" fn OutPoint_clone_void(this_ptr: *const c_void) -> *mut c_void {
Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeOutPoint)).clone() })) as *mut c_void
}
+#[no_mangle]
+pub extern "C" fn OutPoint_clone(orig: &OutPoint) -> OutPoint {
+ OutPoint { inner: Box::into_raw(Box::new(unsafe { &*orig.inner }.clone())), is_owned: true }
+}
/// The referenced transaction's txid.
#[no_mangle]
pub extern "C" fn OutPoint_get_txid(this_ptr: &OutPoint) -> *const [u8; 32] {