Skip to main content

ddwaf_object_insert_key

Function ddwaf_object_insert_key 

Source
pub unsafe extern "C" fn ddwaf_object_insert_key(
    map: *mut ddwaf_object,
    key: *const c_char,
    length: u32,
    alloc: ddwaf_allocator,
) -> *mut ddwaf_object
Expand description

Inserts a new object into a map object, using a key.

@param map Map in which to insert the object. (nonnull) @param key The key for indexing purposes, this string will be copied. (nonnull) @param length Length of the key. @param alloc Allocator to use for memory allocation. (nonnull)

@return A pointer to the newly inserted object or NULL if the operation failed.