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

Go to the source code of this file.

Functions

static th_sc_entry_tth_sc_entry_new (th_key_t *key, th_any_t value)
 Allocate then initialize a new entry.
 
bool th_sc_entry_add (th_sc_entry_t **root, th_key_t *key, th_any_t value)
 Add an a separate chaining entry to the beginning of a linked list. Return true on success.
 

Function Documentation

◆ th_sc_entry_add()

bool th_sc_entry_add ( th_sc_entry_t ** root,
th_key_t * key,
th_any_t value )

Add an a separate chaining entry to the beginning of a linked list. Return true on success.

Parameters
root
key
value
Returns
true
false

Definition at line 25 of file entry.c.

References th_sc_entry_s::next, and th_sc_entry_new().

Referenced by th_sc_table_put_with_key().

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

◆ th_sc_entry_new()

static th_sc_entry_t * th_sc_entry_new ( th_key_t * key,
th_any_t value )
static

Allocate then initialize a new entry.

Parameters
key
value
Returns
th_sc_entry_t*

Definition at line 10 of file entry.c.

References th_sc_entry_s::key, th_sc_entry_s::next, th_sc_entry_s::previous, and th_sc_entry_s::value.

Referenced by th_sc_entry_add().

Here is the caller graph for this function: