Skip to content

Implementation of Shallow Hash Table#1

Draft
UnknownRori wants to merge 2 commits intomainfrom
impl-hashtable
Draft

Implementation of Shallow Hash Table#1
UnknownRori wants to merge 2 commits intomainfrom
impl-hashtable

Conversation

@UnknownRori
Copy link
Owner

@UnknownRori UnknownRori commented Dec 17, 2025

The plan is to create a simple to use and yet user that handle the raw memory pointer, but you can still index it based on the hash function the user provided.

For example :

static size_t hash(void* data) {
  return INDEX;
}

rstb_sht my_hashtable = {0};
rstb_sht_init(&my_hashtable, hash);

int my_data = 34 + 35;
rstb_sht_put(&my_hashtable, "hello", &my_data);

int* ptr = NULL;
rstb_sht_get(&my_hashtable, "hello");

@UnknownRori UnknownRori marked this pull request as draft December 17, 2025 10:07
@UnknownRori UnknownRori self-assigned this Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant