RAX helper functions.
More...
#include "compile_time.h"
#include "src/lib/rax_extras.h"
#include "src/lib/random.h"
#include "src/lib/sds_extras.h"
#include <stdlib.h>
◆ rax_free_data()
Frees a rax tree and its data with a free_cb
- Parameters
-
| r | rax tree to free |
| free_cb | callback to free data or NULL to free a pointer |
◆ rax_free_sds_data()
| void rax_free_sds_data |
( |
rax * |
r | ) |
|
Frees a rax tree and its sds data
- Parameters
-
◆ rax_free_sds_data_cb()
| static void rax_free_sds_data_cb |
( |
void * |
data | ) |
|
|
static |
Callback to free sds data
- Parameters
-
| data | pointer to sds string |
◆ rax_insert_no_dup()
| void rax_insert_no_dup |
( |
rax * |
r, |
|
|
sds |
key, |
|
|
void * |
data |
|
) |
| |
Inserts the key into the radix tree. Appends random chars to the key until it is uniq.
- Parameters
-
| r | rax tree to insert |
| key | key to insert |
| data | data to insert |