hts_resize

@hideinitializer Template fn to expand a dynamic array of a given type

@param T The type of the array elements @paramin num Requested number of elements of type T @param[in,out] size Pointer to where the size (in elements) of the array is stored. @param[in,out] ptr Location of the pointer to the array @paramin flags Option flags

@return 0 for success, or negative if an error occurred.

@discussion The array *ptr will be expanded if necessary so that it can hold @p num or more elements. If the array is expanded then the new size will be written to @p *size_ptr and the value in @p *ptr may change.

If ( @p flags & HTS_RESIZE_CLEAR ) is set, any newly allocated memory will be cleared.

extern (C) pragma(inline, true)
int
hts_resize
(
T
)
(
size_t num
,
ref size_t size
,
T* ptr
,
int flags
)

Meta