Classes | Typedefs | Functions | Variables
lhash.c File Reference
#include <openssl/lhash.h>
#include <assert.h>
#include <limits.h>
#include <string.h>
#include <openssl/mem.h>
#include "internal.h"
#include "../internal.h"
Include dependency graph for lhash.c:

Go to the source code of this file.

Classes

struct  lhash_item_st
 
struct  lhash_st
 

Typedefs

typedef struct lhash_item_st LHASH_ITEM
 

Functions

static LHASH_ITEM ** get_next_ptr_and_hash (const _LHASH *lh, uint32_t *out_hash, const void *data, lhash_hash_func_helper call_hash_func, lhash_cmp_func_helper call_cmp_func)
 
static LHASH_ITEM ** get_next_ptr_by_key (const _LHASH *lh, const void *key, uint32_t key_hash, int(*cmp_key)(const void *key, const void *value))
 
static void lh_maybe_resize (_LHASH *lh)
 
static void lh_rebucket (_LHASH *lh, const size_t new_num_buckets)
 
void * OPENSSL_lh_delete (_LHASH *lh, const void *data, lhash_hash_func_helper call_hash_func, lhash_cmp_func_helper call_cmp_func)
 
void OPENSSL_lh_doall_arg (_LHASH *lh, void(*func)(void *, void *), void *arg)
 
void OPENSSL_lh_free (_LHASH *lh)
 
int OPENSSL_lh_insert (_LHASH *lh, void **old_data, void *data, lhash_hash_func_helper call_hash_func, lhash_cmp_func_helper call_cmp_func)
 
_LHASHOPENSSL_lh_new (lhash_hash_func hash, lhash_cmp_func comp)
 
size_t OPENSSL_lh_num_items (const _LHASH *lh)
 
void * OPENSSL_lh_retrieve (const _LHASH *lh, const void *data, lhash_hash_func_helper call_hash_func, lhash_cmp_func_helper call_cmp_func)
 
void * OPENSSL_lh_retrieve_key (const _LHASH *lh, const void *key, uint32_t key_hash, int(*cmp_key)(const void *key, const void *value))
 

Variables

static const size_t kMaxAverageChainLength = 2
 
static const size_t kMinAverageChainLength = 1
 
static const size_t kMinNumBuckets = 16
 

Typedef Documentation

◆ LHASH_ITEM

typedef struct lhash_item_st LHASH_ITEM

Function Documentation

◆ get_next_ptr_and_hash()

static LHASH_ITEM** get_next_ptr_and_hash ( const _LHASH lh,
uint32_t out_hash,
const void *  data,
lhash_hash_func_helper  call_hash_func,
lhash_cmp_func_helper  call_cmp_func 
)
static

Definition at line 152 of file lhash.c.

◆ get_next_ptr_by_key()

static LHASH_ITEM** get_next_ptr_by_key ( const _LHASH lh,
const void *  key,
uint32_t  key_hash,
int(*)(const void *key, const void *value cmp_key 
)
static

Definition at line 174 of file lhash.c.

◆ lh_maybe_resize()

static void lh_maybe_resize ( _LHASH lh)
static

Definition at line 239 of file lhash.c.

◆ lh_rebucket()

static void lh_rebucket ( _LHASH lh,
const size_t  new_num_buckets 
)
static

Definition at line 208 of file lhash.c.

◆ OPENSSL_lh_delete()

void* OPENSSL_lh_delete ( _LHASH lh,
const void *  data,
lhash_hash_func_helper  call_hash_func,
lhash_cmp_func_helper  call_cmp_func 
)

Definition at line 303 of file lhash.c.

◆ OPENSSL_lh_doall_arg()

void OPENSSL_lh_doall_arg ( _LHASH lh,
void(*)(void *, void *)  func,
void *  arg 
)

Definition at line 327 of file lhash.c.

◆ OPENSSL_lh_free()

void OPENSSL_lh_free ( _LHASH lh)

Definition at line 126 of file lhash.c.

◆ OPENSSL_lh_insert()

int OPENSSL_lh_insert ( _LHASH lh,
void **  old_data,
void *  data,
lhash_hash_func_helper  call_hash_func,
lhash_cmp_func_helper  call_cmp_func 
)

Definition at line 268 of file lhash.c.

◆ OPENSSL_lh_new()

_LHASH* OPENSSL_lh_new ( lhash_hash_func  hash,
lhash_cmp_func  comp 
)

Definition at line 106 of file lhash.c.

◆ OPENSSL_lh_num_items()

size_t OPENSSL_lh_num_items ( const _LHASH lh)

Definition at line 143 of file lhash.c.

◆ OPENSSL_lh_retrieve()

void* OPENSSL_lh_retrieve ( const _LHASH lh,
const void *  data,
lhash_hash_func_helper  call_hash_func,
lhash_cmp_func_helper  call_cmp_func 
)

Definition at line 189 of file lhash.c.

◆ OPENSSL_lh_retrieve_key()

void* OPENSSL_lh_retrieve_key ( const _LHASH lh,
const void *  key,
uint32_t  key_hash,
int(*)(const void *key, const void *value cmp_key 
)

Definition at line 197 of file lhash.c.

Variable Documentation

◆ kMaxAverageChainLength

const size_t kMaxAverageChainLength = 2
static

Definition at line 74 of file lhash.c.

◆ kMinAverageChainLength

const size_t kMinAverageChainLength = 1
static

Definition at line 75 of file lhash.c.

◆ kMinNumBuckets

const size_t kMinNumBuckets = 16
static

Definition at line 70 of file lhash.c.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:21