From: icecodder Date: Wed, 4 Jan 2023 12:48:57 +0000 (+0100) Subject: set public function as unsafe X-Git-Tag: v0.1~5 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8f09090698f91e70300726fe7bfd081a834a75d9;p=matthieu%2Fnova.git set public function as unsafe --- diff --git a/exes/all/src/lib.rs b/exes/all/src/lib.rs index f6b527d..29dd6a0 100644 --- a/exes/all/src/lib.rs +++ b/exes/all/src/lib.rs @@ -98,7 +98,7 @@ pub unsafe extern "C" fn stop_instance(instance: *mut AllInOneInstance) { #[no_mangle] /// Initialized a new nova instance and an async runtime (tokio reactor) /// Dont forget to stop this instance using `stop_instance` -pub extern "C" fn start_instance(config: *const libc::c_char) -> *mut AllInOneInstance { +pub unsafe extern "C" fn start_instance(config: *const libc::c_char) -> *mut AllInOneInstance { let buf_name = unsafe { CStr::from_ptr(config).to_bytes() }; let settings = String::from_utf8(buf_name.to_vec()).unwrap(); let (stop, trigger_stop) = oneshot::channel();