Expand description
FFI string helpers that free bridge-owned strings.
FFI string utilities — back-compat shim over doom_fish_utils::ffi_string.
Re-exports the generic, framework-agnostic helpers and adds two thin
wrappers ([ffi_string_owned], [ffi_string_owned_or_empty]) that
bake in crate::ffi::acf_free_string as the deallocator so existing
call sites that used the apple-cf-specific helpers compile unchanged.
Constants§
- DEFAULT_
BUFFER_ SIZE - Default buffer size for FFI string retrieval
- SMALL_
BUFFER_ SIZE - Smaller buffer size for short strings (e.g., device IDs, stream names)
Functions§
- ffi_
string_ ⚠from_ buffer - Retrieves a string from an FFI function that writes to a buffer.
- ffi_
string_ ⚠from_ buffer_ or_ empty - Same as
ffi_string_from_bufferbut returns an empty string on failure instead ofNone. - ffi_
string_ ⚠owned - Retrieves a string from an FFI function that returns an owned C string
pointer allocated by Swift (typically via
strdup), freeing it withacf_free_string. - ffi_
string_ ⚠owned_ or_ empty - Same as
ffi_string_ownedbut returns an empty string on failure.