meanwhile  1.1.1
Data Structures | Macros | Functions
mw_util.h File Reference
#include <glib.h>

Go to the source code of this file.

Data Structures

struct  mw_datum
 

Macros

#define map_guint_insert(ht, key, val)   g_hash_table_insert((ht), GUINT_TO_POINTER((guint)(key)), (val))
 
#define map_guint_lookup(ht, key)   g_hash_table_lookup((ht), GUINT_TO_POINTER((guint)(key)))
 
#define map_guint_new()   g_hash_table_new(g_direct_hash, g_direct_equal)
 
#define map_guint_new_full(valfree)   g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (valfree))
 
#define map_guint_remove(ht, key)   g_hash_table_remove((ht), GUINT_TO_POINTER((guint)(key)))
 
#define map_guint_replace(ht, key, val)   g_hash_table_replace((ht), GUINT_TO_POINTER((guint)(key)), (val))
 
#define map_guint_steal(ht, key)   g_hash_table_steal((ht), GUINT_TO_POINTER((guint)(key)))
 

Functions

GList * map_collect_keys (GHashTable *ht)
 
GList * map_collect_values (GHashTable *ht)
 
void mw_datum_clear (struct mw_datum *d)
 
void mw_datum_free (struct mw_datum *d)
 
gpointer mw_datum_get (struct mw_datum *d)
 
struct mw_datummw_datum_new (gpointer data, GDestroyNotify clear)
 
void mw_datum_set (struct mw_datum *d, gpointer data, GDestroyNotify clear)
 

Macro Definition Documentation

◆ map_guint_insert

#define map_guint_insert (   ht,
  key,
  val 
)    g_hash_table_insert((ht), GUINT_TO_POINTER((guint)(key)), (val))

◆ map_guint_lookup

#define map_guint_lookup (   ht,
  key 
)    g_hash_table_lookup((ht), GUINT_TO_POINTER((guint)(key)))

◆ map_guint_new

#define map_guint_new ( )    g_hash_table_new(g_direct_hash, g_direct_equal)

◆ map_guint_new_full

#define map_guint_new_full (   valfree)    g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (valfree))

◆ map_guint_remove

#define map_guint_remove (   ht,
  key 
)    g_hash_table_remove((ht), GUINT_TO_POINTER((guint)(key)))

◆ map_guint_replace

#define map_guint_replace (   ht,
  key,
  val 
)    g_hash_table_replace((ht), GUINT_TO_POINTER((guint)(key)), (val))

◆ map_guint_steal

#define map_guint_steal (   ht,
  key 
)    g_hash_table_steal((ht), GUINT_TO_POINTER((guint)(key)))

Function Documentation

◆ map_collect_keys()

GList* map_collect_keys ( GHashTable *  ht)

◆ map_collect_values()

GList* map_collect_values ( GHashTable *  ht)

◆ mw_datum_clear()

void mw_datum_clear ( struct mw_datum d)

◆ mw_datum_free()

void mw_datum_free ( struct mw_datum d)

◆ mw_datum_get()

gpointer mw_datum_get ( struct mw_datum d)

◆ mw_datum_new()

struct mw_datum* mw_datum_new ( gpointer  data,
GDestroyNotify  clear 
)

◆ mw_datum_set()

void mw_datum_set ( struct mw_datum d,
gpointer  data,
GDestroyNotify  clear 
)