X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=blobdiff_plain;f=c-bindings-gen%2Fsrc%2Ftypes.rs;h=346f588221fa91e0d50a8ee75014f3d60775e799;hp=21b0458ceae6d5bf24b7cb76c7bb44bdbdca3366;hb=11cd55b6baf2c94a44f0cd24774f0d822ff90d66;hpb=434d90f7096839045662fa051722497fa0f555c8 diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index 21b0458..346f588 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -723,6 +723,7 @@ fn initial_clonable_types() -> HashSet { let mut res = HashSet::new(); res.insert("crate::c_types::u5".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()); res.insert("crate::c_types::Transaction".to_owned()); res.insert("crate::c_types::TxOut".to_owned()); @@ -827,7 +828,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { // ************************************************* /// Returns true we if can just skip passing this to C entirely - fn skip_path(&self, full_path: &str) -> bool { + pub fn skip_path(&self, full_path: &str) -> bool { full_path == "bitcoin::secp256k1::Secp256k1" || full_path == "bitcoin::secp256k1::Signing" || full_path == "bitcoin::secp256k1::Verification" @@ -1133,7 +1134,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { "std::time::Duration"|"core::time::Duration" => Some(""), "std::time::SystemTime" => Some(""), "std::io::Error" if !is_ref => Some("crate::c_types::IOError::from_rust("), - "core::fmt::Arguments" => Some("format!(\"{}\", "), + "core::fmt::Arguments" => Some("alloc::format!(\"{}\", "), "core::convert::Infallible" => Some("panic!(\"Cannot construct an Infallible: "),