hashset.c icon indicating copy to clipboard operation
hashset.c copied to clipboard

hash set C implementation

Results 6 hashset.c issues
Sort by recently updated
recently updated
newest added

Do not skip the first non-zero item when creating the iterator.

In the Hashset itr code here: ``` hashset_itr_t hashset_iterator(hashset_t set) { hashset_itr_t itr = calloc(1, sizeof(struct hashset_itr_st)); if (itr == NULL) return NULL; itr->set = set; itr->index = 0; /*...

Maybe you want include the hash functions in comments. This functions give a key based on data passed in parameters.

After removing the -std=c89 requirement mentioned in issue #8 I compiled the code and ran the produced test binary. The following happens: ``` $ ./test test: test.c:172: test_iterating: Assertion `strncmp((char...

``` $ make cc -std=c89 -pedantic -Wall -Wextra -Werror -ggdb3 -O0 -c test.c -o test.o test.c: In function ‘test_fill_with_deleted_items’: test.c:201:5: error: ‘for’ loop initial declarations are only allowed in C99...

I found this out much too late... ``` int main(int argc, char* argv[]) { char *foo = "foo"; char *missing = "missing"; hashset_t set = hashset_create(); if (set == NULL)...