Skip to main content

take_owned_cstring_c

Function take_owned_cstring_c 

Source
pub unsafe fn take_owned_cstring_c<Free>(
    ptr: *mut c_char,
    free_fn: Free,
) -> Option<String>
where Free: FnOnce(*mut c_char),
Expand description

Same as take_owned_cstring but for *mut std::ffi::c_char.

Rust 1.71+ distinguishes c_char from i8 on some targets. Functionally identical to the i8 variant.

ยงSafety

Same requirements as take_owned_cstring.