jabberd2  2.7.0
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

◆ _xhasher()

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().

◆ _xhash_node_new()

static xhn _xhash_node_new ( xht  h,
int  index 
)
static

◆ _xhash_node_get()

static xhn _xhash_node_get ( xht  h,
const char *  key,
int  len,
int  index 
)
static

◆ xhash_new()

xht xhash_new ( int  prime)

◆ xhash_putx()

void xhash_putx ( xht  h,
const char *  key,
int  len,
void *  val 
)

◆ xhash_put()

void xhash_put ( xht  h,
const char *  key,
void *  val 
)

◆ xhash_getx()

void* xhash_getx ( xht  h,
const char *  key,
int  len 
)

◆ xhash_get()

void* xhash_get ( xht  h,
const char *  key 
)

◆ xhash_zap_inner()

void xhash_zap_inner ( xht  h,
xhn  n,
int  index 
)

◆ xhash_zapx()

void xhash_zapx ( xht  h,
const char *  key,
int  len 
)

◆ xhash_zap()

void xhash_zap ( xht  h,
const char *  key 
)

◆ xhash_free()

void xhash_free ( xht  h)

◆ xhash_stat()

void xhash_stat ( xht  h)

Definition at line 250 of file xhash.c.

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

◆ xhash_walk()

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

◆ xhash_dirty()

int xhash_dirty ( xht  h)

return the dirty flag (and reset)

Definition at line 285 of file xhash.c.

References xht_struct::dirty.

◆ xhash_count()

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().

◆ xhash_pool()

pool_t xhash_pool ( xht  h)

◆ xhash_iter_first()

int xhash_iter_first ( xht  h)

◆ xhash_iter_next()

int xhash_iter_next ( xht  h)

◆ xhash_iter_zap()

void xhash_iter_zap ( xht  h)

◆ xhash_iter_get()

int xhash_iter_get ( xht  h,
const char **  key,
int *  keylen,
void **  val 
)