diff options
| author | Teddy Wing | 2018-10-27 00:30:59 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2018-10-27 00:30:59 +0200 | 
| commit | f2f4e4ad357a2bfdffb6ae5e06f2a211f6d6fbdb (patch) | |
| tree | 9515d8de69b27fc96b4fcdc8960ac8a90c9112d6 /src/cocoa_bridge.rs | |
| parent | 775344e98cb3f88c3c1339bb7bd4998ca6d33b93 (diff) | |
| download | dome-key-map-f2f4e4ad357a2bfdffb6ae5e06f2a211f6d6fbdb.tar.bz2 | |
Make `do_trial()` accessible via FFI
Wrap the function in an `extern "C"` function, make it public, and
export it.
Diffstat (limited to 'src/cocoa_bridge.rs')
| -rw-r--r-- | src/cocoa_bridge.rs | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/src/cocoa_bridge.rs b/src/cocoa_bridge.rs index cd1dafa..4b1bd0b 100644 --- a/src/cocoa_bridge.rs +++ b/src/cocoa_bridge.rs @@ -15,6 +15,7 @@ use xdg;  use {Action, HeadphoneButton, MapAction, MapGroup, MapKind};  use config::{self, Config}; +use trial;  #[repr(C)]  struct renameMeMapGroup { @@ -352,6 +353,11 @@ pub extern "C" fn config_free(ptr: *mut Config) {      unsafe { CString::from_raw(config.args.license); }  } +#[no_mangle] +pub extern "C" fn do_trial() { +    trial::do_trial(); +} +  mod tests {      use super::*; | 
