Tinyhash
This is a library containing multiple C implementations of hashmap.
Loading...
Searching...
No Matches
Functions
key.c File Reference
#include <string.h>
#include "hash.h"
#include "key.h"
Include dependency graph for key.c:

Go to the source code of this file.

Functions

th_key_t th_key_create (th_any_t data, size_t size)
 Create a key struct from data and size, it will automatically compute its hash.
 
bool th_key_is_equal (th_key_t *first, th_key_t *second)
 Key comparator function.
 

Function Documentation

◆ th_key_create()

th_key_t th_key_create ( th_any_t data,
size_t size )

Create a key struct from data and size, it will automatically compute its hash.

Parameters
data
size
Returns
th_key_t

Definition at line 6 of file key.c.

References th_key_t::hash, and th_hash().

Referenced by th_oa_table_delete(), th_oa_table_get(), th_oa_table_put(), th_sc_table_delete(), th_sc_table_get(), and th_sc_table_put().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ th_key_is_equal()

bool th_key_is_equal ( th_key_t * first,
th_key_t * second )

Key comparator function.

Parameters
first
second
Returns
true
false

Definition at line 14 of file key.c.

References th_key_t::data, and th_key_t::size.

Referenced by th_oa_table_find(), and th_sc_table_find().

Here is the caller graph for this function: