We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 921fa4a commit 1d69bedCopy full SHA for 1d69bed
src/templ.rs
@@ -110,14 +110,14 @@ macro_rules! return_receive {
110
}
111
112
/// The return type of this function goes into `receive_string`
113
-#[no_mangle]
+#[export_name = "ocvrs_create_string"]
114
unsafe extern "C" fn ocvrs_create_string(s: *const c_char) -> *mut String {
115
let s = CStr::from_ptr(s).to_string_lossy().into_owned();
116
Box::into_raw(Box::new(s))
117
118
119
/// The return type of this function goes into `receive_byte_string`
120
+#[export_name = "ocvrs_create_byte_string"]
121
unsafe extern "C" fn ocvrs_create_byte_string(v: *const u8, len: size_t) -> *mut Vec<u8> {
122
let byte_slice = if v.is_null() {
123
&[]
0 commit comments