projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use Bob Jenkins lookup3 hash instead of FNV.
[pspp-builds.git]
/
src
/
data
/
file-handle-def.c
diff --git
a/src/data/file-handle-def.c
b/src/data/file-handle-def.c
index 5d807ab9a0a5a5b9867836bd62e9daf9ae494281..0652501faa17fa27b19989b07e471b816731360c 100644
(file)
--- a/
src/data/file-handle-def.c
+++ b/
src/data/file-handle-def.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006
, 2009
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-592,10
+592,12
@@
static unsigned int
hash_fh_lock (const void *lock_, const void *aux UNUSED)
{
const struct fh_lock *lock = lock_;
hash_fh_lock (const void *lock_, const void *aux UNUSED)
{
const struct fh_lock *lock = lock_;
- unsigned int
hash = hsh_hash_int ((lock->referent << 3) | lock->access)
;
+ unsigned int
basis
;
if (lock->referent == FH_REF_FILE)
if (lock->referent == FH_REF_FILE)
-
hash ^
= fn_hash_identity (lock->u.file);
+
basis
= fn_hash_identity (lock->u.file);
else if (lock->referent == FH_REF_SCRATCH)
else if (lock->referent == FH_REF_SCRATCH)
- hash ^= hsh_hash_int (lock->u.unique_id);
- return hash;
+ basis = lock->u.unique_id;
+ else
+ basis = 0;
+ return hash_int ((lock->referent << 3) | lock->access, basis);
}
}