From: Matt Corallo Date: Tue, 3 Oct 2023 05:59:41 +0000 (+0000) Subject: Drop `#[no_mangle]`/`extern` flag for internal-only method X-Git-Tag: v0.0.117.0^2~7 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=737b617b2db60132ef7c89713124460c60a3fcca;p=ldk-c-bindings Drop `#[no_mangle]`/`extern` flag for internal-only method This prevents new `cbindgen` from generating bindings for things we don't actually want to export. --- diff --git a/c-bindings-gen/src/main.rs b/c-bindings-gen/src/main.rs index 8876583..956420b 100644 --- a/c-bindings-gen/src/main.rs +++ b/c-bindings-gen/src/main.rs @@ -554,8 +554,7 @@ fn writeln_trait<'a, 'b, W: std::io::Write>(w: &mut W, t: &'a syn::ItemTrait, ty writeln!(w, "unsafe impl Send for {} {{}}", trait_name).unwrap(); writeln!(w, "unsafe impl Sync for {} {{}}", trait_name).unwrap(); - writeln!(w, "#[no_mangle]").unwrap(); - writeln!(w, "pub(crate) extern \"C\" fn {}_clone_fields(orig: &{}) -> {} {{", trait_name, trait_name, trait_name).unwrap(); + writeln!(w, "pub(crate) fn {}_clone_fields(orig: &{}) -> {} {{", trait_name, trait_name, trait_name).unwrap(); writeln!(w, "\t{} {{", trait_name).unwrap(); writeln!(w, "\t\tthis_arg: orig.this_arg,").unwrap(); for (field, clone_fn, _) in generated_fields.iter() {