/// last at least `'a`. When `CStr` is alive, the memory pointed by `ptr`
/// must not be mutated.
#[inline]
- pub unsafe fn from_char_ptr<'a>(ptr: *const crate::ffi::c_char) -> &'a Self {
+ pub unsafe fn from_char_ptr<'a>(ptr: *const c_char) -> &'a Self {
// SAFETY: The safety precondition guarantees `ptr` is a valid pointer
// to a `NUL`-terminated C string.
let len = unsafe { bindings::strlen(ptr) } + 1;
/// Returns a C pointer to the string.
#[inline]
- pub const fn as_char_ptr(&self) -> *const crate::ffi::c_char {
+ pub const fn as_char_ptr(&self) -> *const c_char {
self.0.as_ptr()
}