Function chd_get_header

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn chd_get_header(
    chd: *const chd_file,
) -> *const chd_header
Expand description

Returns a pointer to the extracted CHD header data.

ยงSafety

  • chd is either NULL or a valid pointer to a chd_file obtained from chd_open, chd_open_file, or chd_open_core_file.
  • If chd is NULL, returns NULL.
  • The returned pointer is leaked and the memory should not and can not ever be validly freed. Attempting to free the returned pointer with free is undefined behaviour. A non-leaking variant is provided in chd_read_header.