Skip to main content

ddwaf_object_set_array_large

Function ddwaf_object_set_array_large 

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

Creates an array object for sequential storage with a size_t initial capacity. Capacities above 65,535 use DDWAF_OBJ_LARGE_ARRAY. Large arrays are limited to the smaller of 268,435,455 elements and SIZE_MAX / sizeof(ddwaf_object).

@warning This is a transitional ABI symbol. Source code must use ddwaf_object_set_array. This symbol will be removed in version 3.

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

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