X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=blobdiff_plain;f=c-bindings-gen%2Fsrc%2Ftypes.rs;h=51a5dfcfd0a60207b36303ca7f08b56f03e7894f;hp=2efba6e3c1130e2148bdce95ddb8c6a60c3b5fbb;hb=291aea2200e01843623a67d42112500b1810d276;hpb=eb231dca2c899c983d212bcceab5dacef4e0c1e0 diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index 2efba6e..51a5dfc 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -772,6 +772,7 @@ impl<'a> CrateTypes<'a> { self.clonable_types.borrow_mut().insert(object); } pub fn is_clonable(&self, object: &str) -> bool { + object.starts_with("&'static ") || self.clonable_types.borrow().contains(object) } pub fn write_new_template(&self, mangled_container: String, has_destructor: bool, created_container: &[u8]) {