aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cocoa_bridge.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cocoa_bridge.rs b/src/cocoa_bridge.rs
index ba7b432..1dbd187 100644
--- a/src/cocoa_bridge.rs
+++ b/src/cocoa_bridge.rs
@@ -332,6 +332,18 @@ pub extern "C" fn c_parse_args(
}
#[no_mangle]
+pub extern "C" fn config_read_from_file() -> *mut Config {
+ match config::get_config() {
+ Ok(config) => Box::into_raw(Box::new(config)),
+ Err(e) => {
+ error!("{}", e);
+
+ ptr::null_mut()
+ },
+ }
+}
+
+#[no_mangle]
pub extern "C" fn config_free(ptr: *mut Config) {
if ptr.is_null() { return }
unsafe { Box::from_raw(ptr); }