Skip to main content

ddwaf_object_set_map

Function ddwaf_object_set_map 

Source
pub unsafe extern "C" fn ddwaf_object_set_map(
    object: *mut ddwaf_object,
    capacity: u16,
    alloc: ddwaf_allocator,
) -> *mut ddwaf_object
Expand description

Creates a map object, for key-value storage.

@param object Object to perform the operation on. (nonnull) @param capacity Initial capacity of the map. @param alloc Allocator to use for memory allocation. (nonnull)

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