Function
GLibPtrArraycopy
since: 2.62
Description
Makes a full (deep) copy of a GPtrArray.
func, as a GCopyFunc, takes two arguments, the data to be copied
and a user_data pointer. On common processor architectures, it’s safe to
pass NULL as user_data if the copy function takes only one argument. You
may get compiler warnings from this though if compiling with GCC’s
-Wcast-function-type warning.
If func is NULL, then only the pointers (and not what they are
pointing to) are copied to the new GPtrArray.
The copy of array will have the same GDestroyNotify for its elements as
array. The copy will also be NULL terminated if (and only if) the source
array is.
Available since: 2.62
This function is not directly available to language bindings.
Parameters
array-
Type: An array of
gpointerGPtrArrayto duplicate.The data is owned by the caller of the function. func-
Type:
GCopyFuncA copy function used to copy every element in the array.
user_data-
Type:
gpointerUser data passed to the copy function
func, orNULL.The argument can be NULL.The data is owned by the caller of the function.