// Copyright 2025 Nathan Sizemore <nathanrsizemore@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, you can obtain one at http://mozilla.org/MPL/2.0/.
use ;
/// Return a malloc’ed C string (caller must free with `from_raw`),
/// or `NULL` if `None`.
/// Reclaim (free) a heap-allocated C string previously created with
/// `CString::into_raw`, dropping it at the end of this function.
///
/// # Safety
///
/// This function **assumes** `p` was returned by `CString::into_raw` (or an
/// equivalent allocator-compatible API) and has not already been freed.
/// Passing any other pointer (e.g., to static storage, stack memory, or a
/// string owned by foreign code) is **undefined behavior**.