summaryrefslogtreecommitdiffstatshomepage
path: root/py/makeqstrdata.py
diff options
context:
space:
mode:
Diffstat (limited to 'py/makeqstrdata.py')
-rw-r--r--py/makeqstrdata.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/makeqstrdata.py b/py/makeqstrdata.py
index 934bc43beb..7413365712 100644
--- a/py/makeqstrdata.py
+++ b/py/makeqstrdata.py
@@ -18,9 +18,9 @@ codepoint2name[ord('/')] = 'slash'
# this must match the equivalent function in qstr.c
def compute_hash(qstr):
- hash = 0
+ hash = 5381
for char in qstr:
- hash += ord(char)
+ hash = (hash * 33) ^ ord(char)
return hash & 0xffff
def do_work(infiles):