axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
axlList* axl_list_copy ( axlList list,
axlDuplicateFunc  func 

Allows to copy the provided list, returning a newly allocated structure.

The copy process can also perform a deep copy for all data stored inside the axlList. However, for this purpose it is required to provide a duplication function that is able to implement the duplication operation over the data received.

This handler is optional, and in the case it is not provided, the list returned will be a copy having reference to the content stored.

NOTE: the function also copy the destroy and equal function configured at axl_list_new. If you want to disable destroy function on the copy returned you must use axl_list_set_destroy_func, passing NULL as destroy handler.

listThe list to copy.
funcThe duplication function used to perform a deep copy (optional handler).
A newly allocated axlList with the same configuration as the one provided.

References axl_list_add(), axl_list_get_nth(), axl_list_length(), axl_list_new(), and axl_return_val_if_fail.