X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=blobdiff_plain;f=c-bindings-gen%2Fsrc%2Ftypes.rs;h=494a0ceec330b9c01d0cc30c7353ea18052ea9d3;hp=1e1bffa34b85e4fa52756d6abcd9d80936299030;hb=d08403e45da9202aedfc7220d65f678d4bba54d4;hpb=f8078e127bd05d8056f13245656bcc0af8f3e08d diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index 1e1bffa..494a0ce 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -711,6 +711,10 @@ impl FullLibraryAST { fn initial_clonable_types() -> HashSet { let mut res = HashSet::new(); res.insert("crate::c_types::u5".to_owned()); + res.insert("crate::c_types::FourBytes".to_owned()); + res.insert("crate::c_types::TwelveBytes".to_owned()); + res.insert("crate::c_types::SixteenBytes".to_owned()); + res.insert("crate::c_types::TwentyBytes".to_owned()); res.insert("crate::c_types::ThirtyTwoBytes".to_owned()); res.insert("crate::c_types::SecretKey".to_owned()); res.insert("crate::c_types::PublicKey".to_owned()); @@ -718,8 +722,17 @@ fn initial_clonable_types() -> HashSet { res.insert("crate::c_types::TxOut".to_owned()); res.insert("crate::c_types::Signature".to_owned()); res.insert("crate::c_types::RecoverableSignature".to_owned()); + res.insert("crate::c_types::Bech32Error".to_owned()); res.insert("crate::c_types::Secp256k1Error".to_owned()); res.insert("crate::c_types::IOError".to_owned()); + res.insert("crate::c_types::Error".to_owned()); + res.insert("crate::c_types::Str".to_owned()); + + // Because some types are manually-mapped to CVec_u8Z we may end up checking if its clonable + // before we ever get to constructing the type fully via + // `write_c_mangled_container_path_intern` (which will add it here too), so we have to manually + // add it on startup. + res.insert("crate::c_types::derived::CVec_u8Z".to_owned()); res }