arrayDtoC

Template to copy a D array for use by C.

T*
arrayDtoC
(
T
Flag!"Alloc" alloc = No.Alloc
Flag!"ZeroTerm" zeroTerm = No.ZeroTerm
)
(
T[] array
)

Parameters

T

The array type

alloc

Yes.Alloc to use g_malloc() to allocate the array, No.Alloc to use D memory (defaults to No)

zeroTerm

Yes.ZeroTerminated if the resulting array should be zero terminated (defaults to No)

array T[]

The array to copy

Return Value

Type: T*

C array or null if array is empty