aboutsummaryrefslogtreecommitdiffstats
path: root/src/cocoa_bridge.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cocoa_bridge.rs')
-rw-r--r--src/cocoa_bridge.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cocoa_bridge.rs b/src/cocoa_bridge.rs
index 9392fcb..4d63c44 100644
--- a/src/cocoa_bridge.rs
+++ b/src/cocoa_bridge.rs
@@ -61,12 +61,13 @@ pub struct CKeyActionResult {
#[no_mangle]
pub extern "C" fn c_run_key_action(
- trigger: Trigger,
+ trigger: *const Trigger,
) -> *const CKeyActionResult {
let trigger = unsafe {
- assert!(!trigger.buttons.is_null());
+ assert!(!trigger.is_null());
+ assert!(!(*trigger).buttons.is_null());
- slice::from_raw_parts(trigger.buttons, trigger.length as usize)
+ slice::from_raw_parts((*trigger).buttons, (*trigger).length as usize)
};
let result = match run_key_action_for_mode(trigger, None) {