diff options
Diffstat (limited to 'core_c/src/lib.rs')
| -rw-r--r-- | core_c/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core_c/src/lib.rs b/core_c/src/lib.rs index bdeb7ef..6efd0e9 100644 --- a/core_c/src/lib.rs +++ b/core_c/src/lib.rs @@ -3,13 +3,13 @@ use std::ffi::{c_char, CStr, CString}; pub mod data_c; pub mod service_c; -pub fn string_to_c_char_safe(s: String) -> (CString, *const c_char) { +pub fn str_rs_to_c(s: String) -> (CString, *const c_char) { let c_string = CString::new(s).expect(""); let ptr = c_string.as_ptr(); (c_string, ptr) } -pub fn c_char_to_string_safe(ptr: *const c_char) -> Option<String> { +pub fn str_c_to_rs(ptr: *const c_char) -> Option<String> { if ptr.is_null() { return None; } |
