From d6117cfe48e624362eb87ac77a8ba6244b2b4d01 Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Fri, 25 Oct 2019 18:22:47 +0300 Subject: [PATCH] Use keybits --- simhash/_simhash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simhash/_simhash.c b/simhash/_simhash.c index c01a8a5..5dd0574 100644 --- a/simhash/_simhash.c +++ b/simhash/_simhash.c @@ -164,7 +164,7 @@ static PyObject *similar_indices(PyObject *self, PyObject *args) qsort(simvals, seq_length, sizeof(struct hashrec), cmp_hashrec); /* enumerate similar pairs and add to output list */ - PY_LONG_LONG mask = ((1LL << rotate_bits) - 1) << (HASHBITS - rotate_bits); + PY_LONG_LONG mask = ((1LL << keybits) - 1) << (HASHBITS - keybits); PyObject *outlist = PyList_New(0); for (i=0; i < seq_length - 1; ++i) { Py_ssize_t j, ii = simvals[i].offset;