From ed96ce032ac607694f7716a73c28a75eb056953a Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 16 Oct 2023 01:35:28 +0000 Subject: [PATCH] Drop `#[no_mangle]` from `*_write_void` to make cbindgen not export cbindgen recently switched to exporting all `#[no_mangle]` and `extern "C"` functions. Our `*_write_void` methods are internal-only but we'd marked them `#[no_mangle]`, which resulted in them spuriously appearing in `lightning.h`. --- c-bindings-gen/src/main.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/c-bindings-gen/src/main.rs b/c-bindings-gen/src/main.rs index 22eabf7..6853534 100644 --- a/c-bindings-gen/src/main.rs +++ b/c-bindings-gen/src/main.rs @@ -95,7 +95,6 @@ fn maybe_convert_trait_impl(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(); -- 2.39.5