From: Matt Corallo Date: Wed, 31 May 2023 20:40:00 +0000 (+0000) Subject: Update auto-generated bindings X-Git-Tag: v0.0.115.1^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=32fe6572acdb4cf80f68ca8f9026a3c40f81e731;p=ldk-c-bindings Update auto-generated bindings --- diff --git a/lightning-c-bindings/include/lightning.h b/lightning-c-bindings/include/lightning.h index 8afabdc..da7fa8e 100644 --- a/lightning-c-bindings/include/lightning.h +++ b/lightning-c-bindings/include/lightning.h @@ -18324,6 +18324,12 @@ struct LDKCOption_ScalarZ COption_ScalarZ_none(void); */ void COption_ScalarZ_free(struct LDKCOption_ScalarZ _res); +/** + * Creates a new COption_ScalarZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCOption_ScalarZ COption_ScalarZ_clone(const struct LDKCOption_ScalarZ *NONNULL_PTR orig); + /** * Creates a new CResult_SharedSecretNoneZ in the success state. */ diff --git a/lightning-c-bindings/src/c_types/derived.rs b/lightning-c-bindings/src/c_types/derived.rs index 9b47257..ad65e75 100644 --- a/lightning-c-bindings/src/c_types/derived.rs +++ b/lightning-c-bindings/src/c_types/derived.rs @@ -7826,6 +7826,7 @@ impl Clone for CResult_PublicKeyNoneZ { /// but with all dynamically-allocated buffers duplicated in new buffers. pub extern "C" fn CResult_PublicKeyNoneZ_clone(orig: &CResult_PublicKeyNoneZ) -> CResult_PublicKeyNoneZ { Clone::clone(&orig) } #[repr(C)] +#[derive(Clone)] /// An enum which can either contain a crate::c_types::BigEndianScalar or not pub enum COption_ScalarZ { /// When we're in this state, this COption_ScalarZ contains a crate::c_types::BigEndianScalar @@ -7857,6 +7858,10 @@ pub extern "C" fn COption_ScalarZ_none() -> COption_ScalarZ { #[no_mangle] /// Frees any resources associated with the crate::c_types::BigEndianScalar, if we are in the Some state pub extern "C" fn COption_ScalarZ_free(_res: COption_ScalarZ) { } +#[no_mangle] +/// Creates a new COption_ScalarZ which has the same data as `orig` +/// but with all dynamically-allocated buffers duplicated in new buffers. +pub extern "C" fn COption_ScalarZ_clone(orig: &COption_ScalarZ) -> COption_ScalarZ { Clone::clone(&orig) } #[repr(C)] /// The contents of CResult_SharedSecretNoneZ pub union CResult_SharedSecretNoneZPtr {