Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore Modified Files: ecore_value.c Log Message: prevent degenerated hash values with 64bit pointer =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/ecore_value.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- ecore_value.c 17 May 2008 03:19:38 -0000 1.12 +++ ecore_value.c 17 Jul 2008 22:58:28 -0000 1.13 @@ -56,7 +56,13 @@ EAPI unsigned int ecore_direct_hash(const void *key) { - return ((unsigned int) key); +#ifdef __LP64__ + unsigned long int val = (unsigned long int)key; + + return (unsigned int) ((val >> 32) ^ val); +#else + return (unsigned int) key; +#endif } /** ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs