From: Leon B. <le...@us...> - 2010-10-29 02:37:24
|
Update of /cvsroot/lush/lush/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv18334/src Modified Files: htable.c index.c Log Message: hashcode 64 bits fix. Index: index.c =================================================================== RCS file: /cvsroot/lush/lush/src/index.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** index.c 13 Oct 2007 15:03:36 -0000 1.30 --- index.c 29 Oct 2010 02:37:16 -0000 1.31 *************** *** 288,291 **** --- 288,292 ---- gptr base; union { real r; long l[2]; } u; + u.l[0] = u.l[1] = 0; /* compute */ index_read_idx(ind,&id); Index: htable.c =================================================================== RCS file: /cvsroot/lush/lush/src/htable.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** htable.c 17 Aug 2008 20:18:44 -0000 1.15 --- htable.c 29 Oct 2010 02:37:16 -0000 1.16 *************** *** 572,579 **** char buffer[24]; unsigned long x; ARG_NUMBER(1); ARG_EVAL(1); x = hash_value(APOINTER(1)); ! sprintf(buffer,"%08x", (int)(x)); return new_string(buffer); } --- 572,580 ---- char buffer[24]; unsigned long x; + int l = 2 * sizeof(long); ARG_NUMBER(1); ARG_EVAL(1); x = hash_value(APOINTER(1)); ! sprintf(buffer,"%0*lx", l, x); return new_string(buffer); } |