if _out_result.is_null() {
return Ok(String::new());
}
// SAFETY: out_result was written by the callee as a valid NUL-terminated string.
let out = unsafe { std::ffi::CStr::from_ptr(_out_result) }.to_string_lossy().into_owned();
if let Some(free_fn) = {{ vtable_expr }}.free_string {
// SAFETY: free_fn is the vtable-provided destructor for callback strings.
unsafe { free_fn(_out_result) };
}
Ok(out)