Skip to content

Commit 5ed6199

Browse files
Lorak-mmkmuzarski
authored andcommitted
argconv: Remove old FFI functions
1 parent 5dcc26b commit 5ed6199

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

scylla-rust-wrapper/src/argconv.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,6 @@ use std::ffi::CStr;
44
use std::os::raw::c_char;
55
use std::sync::Arc;
66

7-
// pub unsafe fn ptr_to_ref<T>(ptr: *const T) -> &'static T {
8-
// ptr.as_ref().unwrap()
9-
// }
10-
11-
// pub unsafe fn ptr_to_ref_mut<T>(ptr: *mut T) -> &'static mut T {
12-
// ptr.as_mut().unwrap()
13-
// }
14-
15-
// pub unsafe fn free_boxed<T>(ptr: *mut T) {
16-
// if !ptr.is_null() {
17-
// // This takes the ownership of the boxed value and drops it
18-
// let _ = Box::from_raw(ptr);
19-
// }
20-
// }
21-
22-
// pub unsafe fn clone_arced<T>(ptr: *const T) -> Arc<T> {
23-
// Arc::increment_strong_count(ptr);
24-
// Arc::from_raw(ptr)
25-
// }
26-
27-
// pub unsafe fn free_arced<T>(ptr: *const T) {
28-
// if !ptr.is_null() {
29-
// // This decrements the arc's internal counter and potentially drops it
30-
// Arc::from_raw(ptr);
31-
// }
32-
// }
33-
347
pub unsafe fn ptr_to_cstr(ptr: *const c_char) -> Option<&'static str> {
358
CStr::from_ptr(ptr).to_str().ok()
369
}

0 commit comments

Comments
 (0)