#include "glib-missing.h"
Go to the source code of this file.
Typedefs | |
typedef void(* | aging_free_t )(gpointer value, gpointer udata) |
Functions | |
gpointer | aging_make (gint delay, GHashFunc hash, GEqualFunc eq, aging_free_t kfree, gpointer kdata, aging_free_t vfree, gpointer vdata) |
Create new aging container. | |
void | aging_destroy (gpointer obj) |
Destroy container, freeing all keys and values. | |
gpointer | aging_lookup (gpointer obj, gpointer key) |
Lookup value in table. | |
void | aging_insert (gpointer obj, gpointer key, gpointer value) |
Add value to the table. | |
void | aging_remove (gpointer obj, gpointer key) |
Remove value associated with key, dispose of items (key and value) stored in the hash table, but leave the function parameter alone. |
|
|
|
Destroy container, freeing all keys and values.
|
|
Add value to the table. If it was already present, its lifetime is augmented by the aging delay. The key argument is freed immediately if there is a free routine for keys and the key was present in the table. The previous value is freed and replaced by the new one if there is an insertion conflict and the value pointers are different. |
|
Lookup value in table.
|
|
Create new aging container.
|
|
Remove value associated with key, dispose of items (key and value) stored in the hash table, but leave the function parameter alone.
|