- Revision
- 16064
- Author
- vajda
- Date
- 2007-12-06 12:47:27 -0800 (Thu, 06 Dec 2007)
Log Message
more on int vs long
Modified Paths
Diff
Modified: trunk/internal/chandlerdb/chandlerdb/item/itemref.c (16063 => 16064)
--- trunk/internal/chandlerdb/chandlerdb/item/itemref.c 2007-12-06 20:26:50 UTC (rev 16063) +++ trunk/internal/chandlerdb/chandlerdb/item/itemref.c 2007-12-06 20:47:27 UTC (rev 16064) @@ -25,7 +25,7 @@ static int t_itemref_traverse(t_itemref *self, visitproc visit, void *arg); static PyObject *t_itemref_new(PyTypeObject *type, PyObject *args, PyObject *kwds); -static int t_itemref_hash(t_itemref *self); +static long t_itemref_hash(t_itemref *self); static PyObject *t_itemref_repr(t_itemref *self); static int t_itemref_cmp(t_itemref *self, t_itemref *other); static PyObject *t_itemref_richcmp(t_itemref *self, t_itemref *other, int opid); @@ -240,7 +240,7 @@ return (PyObject *) _t_itemref_new(uuid, (t_view *) view, NULL); } -static int t_itemref_hash(t_itemref *self) +static long t_itemref_hash(t_itemref *self) { return ((t_uuid *) self->uuid)->hash; }
Modified: trunk/internal/chandlerdb/chandlerdb/util/uuid.c (16063 => 16064)
--- trunk/internal/chandlerdb/chandlerdb/util/uuid.c 2007-12-06 20:26:50 UTC (rev 16063) +++ trunk/internal/chandlerdb/chandlerdb/util/uuid.c 2007-12-06 20:47:27 UTC (rev 16064) @@ -104,7 +104,7 @@ while (++i < len) { unsigned char source = uuid[i]; unsigned char byte = hTable[(unsigned char) ((hash & 0xff) ^ source)]; - unsigned int newHash = byte; + unsigned long newHash = byte; hash >>= 8; byte = hTable[(unsigned char) ((hash & 0xff) ^ (source + 1))]; @@ -202,7 +202,7 @@ static long hash_long(unsigned long n) { - unsigned int hash; + unsigned long hash; hash = chew_long(n); hash |= chew_long(++n) << 8; @@ -231,7 +231,7 @@ long combine_longs(unsigned long h0, unsigned long h1) { - unsigned int hash; + unsigned long hash; while (!(hash = hash_long(h0 + h1))) h0 = hash_long(h0);
_______________________________________________ Commits mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/commits
