GArray* g_array_new_take_zero_terminated ( gpointer data, gboolean clear, gsize element_size )
Creates a new
data as array data, computing the length of it
and setting the reference count to 1.
This avoids having to copy the data manually, when it can just be
data will eventually be freed using g_free(), so must
have been allocated with a suitable allocator.
The length is calculated by iterating through
data until the first
element is found.
In case the elements need to be cleared when the array is freed, use
g_array_set_clear_func() to set a
GDestroyNotify function to perform
Do not use it if
data length or
element_size are greater than
GArray stores the length of its data in #guint, which may be shorter
Available since: 2.76
This function is not directly available to language bindings.
Type: An array of
An array of elements of
The array must be
GArrayelements should be automatically cleared to 0 when they are allocated.
The size of each element in bytes.