From: Matt Corallo Date: Mon, 29 Mar 2021 19:23:42 +0000 (-0400) Subject: Update auto-generated bindings with Option constructor utilities X-Git-Tag: v0.0.98~19^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=refs%2Fheads%2F2021-03-option-primitive;p=ldk-c-bindings Update auto-generated bindings with Option constructor utilities --- diff --git a/lightning-c-bindings/include/lightning.h b/lightning-c-bindings/include/lightning.h index 3e332a6..c2bf71a 100644 --- a/lightning-c-bindings/include/lightning.h +++ b/lightning-c-bindings/include/lightning.h @@ -5094,6 +5094,10 @@ struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDK void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res); +struct LDKCOption_u32Z COption_u32Z_some(uint32_t o); + +struct LDKCOption_u32Z COption_u32Z_none(void); + void COption_u32Z_free(struct LDKCOption_u32Z _res); struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig); @@ -5250,6 +5254,10 @@ void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecod struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig); +struct LDKCOption_u64Z COption_u64Z_some(uint64_t o); + +struct LDKCOption_u64Z COption_u64Z_none(void); + void COption_u64Z_free(struct LDKCOption_u64Z _res); struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig); @@ -5412,6 +5420,10 @@ void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res); struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig); +struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o); + +struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void); + void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res); struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void); diff --git a/lightning-c-bindings/src/c_types/derived.rs b/lightning-c-bindings/src/c_types/derived.rs index 0660e26..1762eb2 100644 --- a/lightning-c-bindings/src/c_types/derived.rs +++ b/lightning-c-bindings/src/c_types/derived.rs @@ -343,6 +343,14 @@ impl COption_u32Z { } } #[no_mangle] +pub extern "C" fn COption_u32Z_some(o: u32) -> COption_u32Z { + COption_u32Z::Some(o) +} +#[no_mangle] +pub extern "C" fn COption_u32Z_none() -> COption_u32Z { + COption_u32Z::None +} +#[no_mangle] pub extern "C" fn COption_u32Z_free(_res: COption_u32Z) { } #[no_mangle] pub extern "C" fn COption_u32Z_clone(orig: &COption_u32Z) -> COption_u32Z { orig.clone() } @@ -1898,6 +1906,14 @@ impl COption_u64Z { } } #[no_mangle] +pub extern "C" fn COption_u64Z_some(o: u64) -> COption_u64Z { + COption_u64Z::Some(o) +} +#[no_mangle] +pub extern "C" fn COption_u64Z_none() -> COption_u64Z { + COption_u64Z::None +} +#[no_mangle] pub extern "C" fn COption_u64Z_free(_res: COption_u64Z) { } #[no_mangle] pub extern "C" fn COption_u64Z_clone(orig: &COption_u64Z) -> COption_u64Z { orig.clone() } @@ -3484,6 +3500,14 @@ impl COption_C2Tuple_usizeTransactionZZ { } } #[no_mangle] +pub extern "C" fn COption_C2Tuple_usizeTransactionZZ_some(o: crate::c_types::derived::C2Tuple_usizeTransactionZ) -> COption_C2Tuple_usizeTransactionZZ { + COption_C2Tuple_usizeTransactionZZ::Some(o) +} +#[no_mangle] +pub extern "C" fn COption_C2Tuple_usizeTransactionZZ_none() -> COption_C2Tuple_usizeTransactionZZ { + COption_C2Tuple_usizeTransactionZZ::None +} +#[no_mangle] pub extern "C" fn COption_C2Tuple_usizeTransactionZZ_free(_res: COption_C2Tuple_usizeTransactionZZ) { } #[repr(C)] pub union CResult_NoneAPIErrorZPtr {