From 5640fb8bd91bbcdc12fd3a8e5057fdc28e89324e Mon Sep 17 00:00:00 2001 From: Pariring Date: Thu, 3 Nov 2022 20:54:59 +0900 Subject: [PATCH] fix: send as raw instead of pointer --- src/lib.rs | 4 ++-- vendor/skyhook | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 7a7b1bb..0f58ec9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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() diff --git a/vendor/skyhook b/vendor/skyhook index b3a6339..716135b 160000 --- a/vendor/skyhook +++ b/vendor/skyhook @@ -1 +1 @@ -Subproject commit b3a6339e1a7496de4b2c7848805ce8e1e9ca6c25 +Subproject commit 716135b7bcdaa2da373f61f826d839a4b3b7aab0