Function mupdf_sys::fz_store_item

source ·
pub unsafe extern "C" fn fz_store_item(
    ctx: *mut fz_context,
    key: *mut c_void,
    val: *mut c_void,
    itemsize: usize,
    type_: *const fz_store_type
) -> *mut c_void
Expand description

Add an item to the store.

Add an item into the store, returning NULL for success. If an item with the same key is found in the store, then our item will not be inserted, and the function will return a pointer to that value instead. This function takes its own reference to val, as required (i.e. the caller maintains ownership of its own reference).

key: The key used to index the item.

val: The value to store.

itemsize: The size in bytes of the value (as counted towards the store size).

type: Functions used to manipulate the key.