jabberd2  2.3.1
Functions
xhash.c File Reference
#include "xhash.h"
#include "util.h"

Go to the source code of this file.

Functions

static int _xhasher (const char *s, int len)
 
static xhn _xhash_node_new (xht h, int index)
 
static xhn _xhash_node_get (xht h, const char *key, int len, int index)
 
xht xhash_new (int prime)
 
void xhash_putx (xht h, const char *key, int len, void *val)
 
void xhash_put (xht h, const char *key, void *val)
 
void * xhash_getx (xht h, const char *key, int len)
 
void * xhash_get (xht h, const char *key)
 
void xhash_zap_inner (xht h, xhn n, int index)
 
void xhash_zapx (xht h, const char *key, int len)
 
void xhash_zap (xht h, const char *key)
 
void xhash_free (xht h)
 
void xhash_stat (xht h)
 
void xhash_walk (xht h, xhash_walker w, void *arg)
 
int xhash_dirty (xht h)
 return the dirty flag (and reset) More...
 
int xhash_count (xht h)
 return the total number of entries in this xht More...
 
pool_t xhash_pool (xht h)
 get our pool More...
 
int xhash_iter_first (xht h)
 iteration More...
 
int xhash_iter_next (xht h)
 
void xhash_iter_zap (xht h)
 
int xhash_iter_get (xht h, const char **key, int *keylen, void **val)
 

Function Documentation

static int _xhasher ( const char *  s,
int  len 
)
static

Definition at line 29 of file xhash.c.

Referenced by xhash_getx(), xhash_iter_zap(), xhash_putx(), and xhash_zapx().

static xhn _xhash_node_new ( xht  h,
int  index 
)
static
static xhn _xhash_node_get ( xht  h,
const char *  key,
int  len,
int  index 
)
static
xht xhash_new ( int  prime)
void xhash_putx ( xht  h,
const char *  key,
int  len,
void *  val 
)
void xhash_put ( xht  h,
const char *  key,
void *  val 
)
void* xhash_getx ( xht  h,
const char *  key,
int  len 
)
void* xhash_get ( xht  h,
const char *  key 
)
void xhash_zap_inner ( xht  h,
xhn  n,
int  index 
)
void xhash_zapx ( xht  h,
const char *  key,
int  len 
)
void xhash_zap ( xht  h,
const char *  key 
)
void xhash_free ( xht  h)
void xhash_stat ( xht  h)

Definition at line 250 of file xhash.c.

References xht_struct::count, xht_struct::prime, and xht_struct::stat.

void xhash_walk ( xht  h,
xhash_walker  w,
void *  arg 
)
int xhash_dirty ( xht  h)

return the dirty flag (and reset)

Definition at line 285 of file xhash.c.

References xht_struct::dirty.

int xhash_count ( xht  h)

return the total number of entries in this xht

Definition at line 297 of file xhash.c.

References xht_struct::count.

Referenced by _dns_add_host(), _dns_add_result(), _dns_result_a(), _dns_result_srv(), _router_process_route(), _s2s_time_checks(), out_resolve(), and sm_register_ns().

pool_t xhash_pool ( xht  h)
int xhash_iter_first ( xht  h)
int xhash_iter_next ( xht  h)
void xhash_iter_zap ( xht  h)
int xhash_iter_get ( xht  h,
const char **  key,
int *  keylen,
void **  val 
)