Skip to main content

SDL_calloc_func

Type Alias SDL_calloc_func 

Source
pub type SDL_calloc_func = Option<unsafe extern "C" fn(nmemb: usize, size: usize) -> *mut c_void>;
Expand description

A callback used to implement SDL_calloc().

SDL will always ensure that the passed nmemb and size are both greater than 0.

Parameter: nmemb the number of elements in the array. Parameter: size the size of each element of the array. Returns: a pointer to the allocated array, or NULL if allocation failed.

Thread Safety: It should be safe to call this callback from any thread.

Available Since: This datatype is available since SDL 3.2.0.

See Also: SDL_calloc See Also: SDL_GetOriginalMemoryFunctions See Also: SDL_GetMemoryFunctions See Also: SDL_SetMemoryFunctions

Aliased Type§

pub enum SDL_calloc_func {
    None,
    Some(unsafe extern "C" fn(usize, usize) -> *mut c_void),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(usize, usize) -> *mut c_void)

Some value of type T.