Skip to main content

Module ffi_string

Module ffi_string 

Source
Expand description

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_buffer but returns an empty string on failure instead of None.
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 with acf_free_string.
ffi_string_owned_or_empty
Same as ffi_string_owned but returns an empty string on failure.