fix: send as raw instead of pointer

fix/data-structure
paring 2022-11-03 20:54:59 +09:00
parent d49ea3d104
commit 5640fb8bd9
Signed by: pikokr
GPG Key ID: DB839724AD14EC9F
2 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ pub extern "C" fn start_hook(callback: extern "C" fn(NativeEvent)) -> *const c_c
send_callback(event);
}) {
let cstr = CString::new(e.message).unwrap();
return cstr.as_ptr();
return cstr.into_raw();
}
null()
@ -65,7 +65,7 @@ pub extern "C" fn start_hook(callback: extern "C" fn(NativeEvent)) -> *const c_c
pub extern "C" fn stop_hook() -> *const c_char {
if let Err(e) = skyhook::stop() {
let cstr = CString::new(e.message).unwrap();
return cstr.as_ptr();
return cstr.into_raw();
}
null()

2
vendor/skyhook vendored

@ -1 +1 @@
Subproject commit b3a6339e1a7496de4b2c7848805ce8e1e9ca6c25
Subproject commit 716135b7bcdaa2da373f61f826d839a4b3b7aab0