normed: output directory
This commit is contained in:
parent
7bb95e24a6
commit
3d11b63428
37 changed files with 692 additions and 708 deletions
19
output/src/hashmap/env/env_utils.c
vendored
19
output/src/hashmap/env/env_utils.c
vendored
|
|
@ -16,12 +16,11 @@
|
|||
#include "me/types.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
t_str *hmap_env_get(t_hashmap_env *hmap,
|
||||
t_str *key)
|
||||
t_str *hmap_env_get(t_hashmap_env *hmap, t_str *key)
|
||||
{
|
||||
t_usize hashed_key;
|
||||
t_entry_env *entry;
|
||||
t_entry_env *prev;
|
||||
t_usize hashed_key;
|
||||
t_entry_env *entry;
|
||||
t_entry_env *prev;
|
||||
|
||||
hmap->hfunc(&hmap->hasher, key);
|
||||
hashed_key = hasher_reset_and_finish(&hmap->hasher);
|
||||
|
|
@ -31,18 +30,18 @@ t_str *hmap_env_get(t_hashmap_env *hmap,
|
|||
return (&entry->kv.val);
|
||||
}
|
||||
|
||||
void hmap_env_remove(t_hashmap_env *hmap, t_str *key)
|
||||
void hmap_env_remove(t_hashmap_env *hmap, t_str *key)
|
||||
{
|
||||
t_usize hashed_key;
|
||||
t_entry_env *prev;
|
||||
t_entry_env *entry;
|
||||
t_usize hashed_key;
|
||||
t_entry_env *prev;
|
||||
t_entry_env *entry;
|
||||
|
||||
hmap->hfunc(&hmap->hasher, key);
|
||||
hashed_key = hasher_reset_and_finish(&hmap->hasher);
|
||||
prev = NULL;
|
||||
entry = hmap_env_get_entry(hmap, hashed_key, key, &prev);
|
||||
if (entry == NULL)
|
||||
return;
|
||||
return ;
|
||||
if (prev == NULL)
|
||||
hmap->buckets[hashed_key % hmap->num_buckets] = entry->next;
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue