]> git.bitcoin.ninja Git - ldk-c-bindings/commitdiff
Consider all reference types clonable (because they are)
authorMatt Corallo <git@bluematt.me>
Wed, 23 Mar 2022 03:38:15 +0000 (03:38 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 23 Mar 2022 18:04:41 +0000 (18:04 +0000)
c-bindings-gen/src/types.rs

index 2efba6e3c1130e2148bdce95ddb8c6a60c3b5fbb..51a5dfcfd0a60207b36303ca7f08b56f03e7894f 100644 (file)
@@ -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]) {