Drop `#[no_mangle]` from `*_write_void` to make cbindgen not export
[ldk-c-bindings] / c-bindings-gen / src / main.rs
index 22eabf7affbb53fdfb7c47a863fd4db9232e37ed..6853534624427a7b0a5fcb8295f8b4999254e672 100644 (file)
@@ -95,7 +95,6 @@ fn maybe_convert_trait_impl<W: std::io::Write>(w: &mut W, trait_path: &syn::Path
 
                                writeln!(w, "}}").unwrap();
                                if has_inner {
-                                       writeln!(w, "#[no_mangle]").unwrap();
                                        writeln!(w, "pub(crate) extern \"C\" fn {}_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {{", for_obj).unwrap();
                                        writeln!(w, "\tcrate::c_types::serialize_obj(unsafe {{ &*(obj as *const native{}) }})", for_obj).unwrap();
                                        writeln!(w, "}}").unwrap();