From 71accd5e14347b178b4106329e1c3acc1caf3b5d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 4 Mar 2025 03:58:28 -0700 Subject: [PATCH] [fontations] Hide one symbol How do I hide the other internal extern "C" symbols? --- src/fontations/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fontations/lib.rs b/src/fontations/lib.rs index 2e980bce3..d0f51f077 100644 --- a/src/fontations/lib.rs +++ b/src/fontations/lib.rs @@ -21,7 +21,7 @@ struct FontationsData { // A destructor for the user_data #[no_mangle] -extern "C" fn fontations_data_destroy(ptr: *mut c_void) { +extern "C" fn _hb_fontations_data_destroy(ptr: *mut c_void) { if !ptr.is_null() { unsafe { let _ = Box::from_raw(ptr as *mut FontationsData); } } @@ -45,7 +45,7 @@ extern "C" fn _hb_fontations_get_glyph_h_advance( } #[no_mangle] -extern "C" fn _hb_fontations_font_funcs_create() -> *mut hb_font_funcs_t { +fn _hb_fontations_font_funcs_create() -> *mut hb_font_funcs_t { let ffuncs = unsafe { hb_font_funcs_create() }; unsafe { @@ -72,7 +72,7 @@ pub extern "C" fn hb_fontations_font_set_funcs( let data_ptr = Box::into_raw(Box::new(data)) as *mut c_void; unsafe { - hb_font_set_funcs (font, ffuncs, data_ptr, Some(fontations_data_destroy)); + hb_font_set_funcs (font, ffuncs, data_ptr, Some(_hb_fontations_data_destroy)); } unsafe { hb_font_funcs_destroy (ffuncs); }