summaryrefslogtreecommitdiff
path: root/util/bitset.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-07-15 00:36:08 -0700
committerOri Bernstein <ori@eigenstate.org>2017-07-15 00:36:42 -0700
commit357f87c1117edfdf77411781ebfae221a406c454 (patch)
tree5e70ba66596b8ee13ceb46e2c9268fe12101f17a /util/bitset.c
parent15b5fb5c0f9fee25b01a245229efcef21c103bdc (diff)
downloadmc-357f87c1117edfdf77411781ebfae221a406c454.tar.gz
Type binding refactoring now compiles.
Still a bit sloppy on a few things, needs some dedup work, but it's working.
Diffstat (limited to 'util/bitset.c')
-rw-r--r--util/bitset.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/util/bitset.c b/util/bitset.c
index 6aa9344..6109f9e 100644
--- a/util/bitset.c
+++ b/util/bitset.c
@@ -225,6 +225,15 @@ bsintersect(Bitset *a, Bitset *b)
a->chunks[i] &= b->chunks[i];
}
+ulong
+bshash(Bitset *bs)
+{
+ if (!bs)
+ return 14247517;
+ else
+ return murmurhash2(bs->chunks, bs->nchunks * sizeof(size_t));
+}
+
void
bsdiff(Bitset *a, Bitset *b)
{