Skip to main content

ly_set_add

Function ly_set_add 

Source
pub unsafe extern "C" fn ly_set_add(
    set: *mut ly_set,
    object: *const c_void,
    list: ly_bool,
    index_p: *mut u32,
) -> Type
Expand description

@brief Add an object into the set

@param[in] set Set where the @p object will be added. @param[in] object Object to be added into the @p set; @param[in] list flag to handle set as a list (without checking for (ignoring) duplicit items) @param[out] index_p Optional pointer to return index of the added @p object. Usually it is the last index (::ly_set::count - 1), but in case the duplicities are checked and the object is already in the set, the @p object is not added and index of the already present object is returned. @return LY_SUCCESS in case of success @return LY_EINVAL in case of invalid input parameters. @return LY_EMEM in case of memory allocation failure.