From d0360e8679434a1b39eb873eb35a15a32b66a1c4 Mon Sep 17 00:00:00 2001 From: tmathern <60901087+tmathern@users.noreply.github.com> Date: Thu, 1 Oct 2026 20:49:29 -0700 Subject: [PATCH] fix: undo mangle --- src/utils.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index ca9e7fc..a0d0998 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1077,9 +1077,10 @@ pub fn untrack_owned(ptr: *mut T) -> Result { /// Universal free function for any tracked pointer /// -/// This is the universal free function exposed to C. It works for ANY pointer -/// that was allocated and tracked through cimpl, regardless of the wrapper type -/// (Box, Arc, etc.) or the underlying Rust type. +/// Works for ANY pointer that was allocated and tracked through cimpl, regardless +/// of the wrapper type (Box, Arc, etc.) or the underlying Rust type. It is a Rust +/// function; each library exposes it to C through its own `#[no_mangle]` wrapper +/// (see `mylib_free` in the crate docs). /// /// # Returns /// - `0` on success @@ -1123,7 +1124,6 @@ pub fn untrack_owned(ptr: *mut T) -> Result { /// // Handle error /// } /// ``` -#[no_mangle] pub extern "C" fn cimpl_free(ptr: *mut std::ffi::c_void) -> i32 { match get_registry().free(ptr as usize) { Ok(()) => 0,