axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
void axl_hash_insert_full ( axlHash hash,
axlPointer  key,
axlDestroyFunc  key_destroy,
axlPointer  data,
axlDestroyFunc  data_destroy 
)

Inserts a key value into the provided hash table, allowing to provide deallocation functions for the key and the data to be stored.

NOTE: The insert operation will replace a previously inserted item with the same key. If no item is found, an insert will take place, otherwise previous item is replaced calling to the key destroy and data destroy functions defined.

Parameters
hashThe hash table where the data will be added.
keyThe key to store in the hash table. If the key is found, previous data is replaced, storing this new key and the value provided.
key_destroyAn optional destroy function that will be called to deallocate the key provided.
dataThe data to store associated to the provided key.
data_destroyAn optional destroy function that will be called to deallocate the data provided.

References axl_false, axl_free(), axl_new, axl_return_if_fail, and axl_true.

Referenced by axl_hash_insert(), and axl_node_annotate_data_full().