Loading src/hash_tbl.c −15 Changes for src/hash_tbl.c: 0 added lines, 15 removed lines. Original line number Diff line number Diff line Loading @@ -21,24 +21,9 @@ hash_tbl htbl_empty(size_t (*h)(void*), } int htbl_add(hash_tbl htbl, void* x){ size_t key = htbl->h(x); size_t index = key % htbl->capacity; list_t l = htbl->array[index]; if (l == NULL){ l = list_empty(); htbl->array[index] = l; } l = list_push(l, x); htbl->size++; } int htbl_in(hash_tbl htbl, void* x){ size_t key = htbl->h(x); size_t index = key % htbl->capacity; list_t l = htbl->array[index]; if (l == NULL) return 0; return list_in(l, x, htbl->eq); } void htbl_destroy(hash_tbl htbl){ Loading Loading
src/hash_tbl.c −15 Changes for src/hash_tbl.c: 0 added lines, 15 removed lines. Original line number Diff line number Diff line Loading @@ -21,24 +21,9 @@ hash_tbl htbl_empty(size_t (*h)(void*), } int htbl_add(hash_tbl htbl, void* x){ size_t key = htbl->h(x); size_t index = key % htbl->capacity; list_t l = htbl->array[index]; if (l == NULL){ l = list_empty(); htbl->array[index] = l; } l = list_push(l, x); htbl->size++; } int htbl_in(hash_tbl htbl, void* x){ size_t key = htbl->h(x); size_t index = key % htbl->capacity; list_t l = htbl->array[index]; if (l == NULL) return 0; return list_in(l, x, htbl->eq); } void htbl_destroy(hash_tbl htbl){ Loading