yyjson_mut_arr_with_uint16

Function yyjson_mut_arr_with_uint16 

Source
pub unsafe extern "C" fn yyjson_mut_arr_with_uint16(
    doc: *mut yyjson_mut_doc,
    vals: *const u16,
    count: usize,
) -> *mut yyjson_mut_val
Expand description

Creates and returns a new mutable array with the given uint16 numbers.

@param doc A mutable document, used for memory allocation only. If this parameter is NULL, the function will fail and return NULL. @param vals A C array of uint16 numbers. @param count The number count. If this value is 0, an empty array will return. @return The new array. NULL if input is invalid or memory allocation failed.

@par Example @code const uint16_t vals[3] = { 0, 1, 0 }; yyjson_mut_val *arr = yyjson_mut_arr_with_uint16(doc, vals, 3); @endcode