diff options
author | dkf <dkf@noemail.net> | 2010-02-10 16:29:49 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2010-02-10 16:29:49 (GMT) |
commit | c92b956a226454a66098be0519d11d609c160c51 (patch) | |
tree | 8987de7ab1b1887160efec0fecffcc187da51147 | |
parent | d574e875d672ca08f8dff1ee9d828507f64fe366 (diff) | |
download | tcl-c92b956a226454a66098be0519d11d609c160c51.zip tcl-c92b956a226454a66098be0519d11d609c160c51.tar.gz tcl-c92b956a226454a66098be0519d11d609c160c51.tar.bz2 |
Forgot the magic bias values. FNV is wildly magical...
FossilOrigin-Name: 5ba97c097d2f425ccb44d531be0a2f0f6bb5dec1
-rw-r--r-- | generic/tclHash.c | 4 | ||||
-rw-r--r-- | generic/tclObj.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclHash.c b/generic/tclHash.c index 9824afd..47d8fba 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHash.c,v 1.41 2010/02/09 22:39:11 dkf Exp $ + * RCS: @(#) $Id: tclHash.c,v 1.42 2010/02/10 16:29:49 dkf Exp $ */ #include "tclInt.h" @@ -872,7 +872,7 @@ HashStringKey( void *keyPtr) /* Key from which to compute hash value. */ { const unsigned char *string = keyPtr; - unsigned result = 0; + unsigned result = 0x811c9dc5; unsigned c; /* diff --git a/generic/tclObj.c b/generic/tclObj.c index 6287b24..b45d1c8 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.167 2010/02/07 09:10:33 dkf Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.168 2010/02/10 16:29:49 dkf Exp $ */ #include "tclInt.h" @@ -4038,7 +4038,7 @@ TclHashObjKey( void *keyPtr) /* Key from which to compute hash value. */ { Tcl_Obj *objPtr = keyPtr; - register unsigned result = 0; + register unsigned result = 0x811c9dc5; const unsigned char *string = (unsigned char *) TclGetString(objPtr); const unsigned char *last = string + objPtr->length; |