Skip to content

Commit

Permalink
Fix function signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeRoggenbuck committed Aug 4, 2024
1 parent efbf8e0 commit 0640b2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/util/hashmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ struct Hashmap *create_hashmap(int capacity) {
h->size = 0;
h->cap = capacity;

h->hash = fnva1;

return h;
}

Expand Down
6 changes: 3 additions & 3 deletions src/util/hashmap.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
struct BucketNode {
void *key;
char *key;
void *value;
struct BucketNode *next;
};
Expand All @@ -9,8 +9,8 @@ struct Hashmap {
int size;
int cap;

unsigned (*hash)(void *);
unsigned (*equals)(void *, void *);
unsigned (*hash)(char *);
unsigned (*equals)(char *, char *);
};

struct Hashmap *create_hashmap(int capacity);
Expand Down

0 comments on commit 0640b2a

Please sign in to comment.