Skip to content

Commit 1d69bed

Browse files
committed
Don't export ocvrs_create_string and ocvrs_create_byte_string in the rlib
1 parent 921fa4a commit 1d69bed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/templ.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ macro_rules! return_receive {
110110
}
111111

112112
/// The return type of this function goes into `receive_string`
113-
#[no_mangle]
113+
#[export_name = "ocvrs_create_string"]
114114
unsafe extern "C" fn ocvrs_create_string(s: *const c_char) -> *mut String {
115115
let s = CStr::from_ptr(s).to_string_lossy().into_owned();
116116
Box::into_raw(Box::new(s))
117117
}
118118

119119
/// The return type of this function goes into `receive_byte_string`
120-
#[no_mangle]
120+
#[export_name = "ocvrs_create_byte_string"]
121121
unsafe extern "C" fn ocvrs_create_byte_string(v: *const u8, len: size_t) -> *mut Vec<u8> {
122122
let byte_slice = if v.is_null() {
123123
&[]

0 commit comments

Comments
 (0)