src/share/vm/libadt/dict.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/libadt/dict.cpp	Mon Feb  2 17:49:27 2009
--- new/src/share/vm/libadt/dict.cpp	Mon Feb  2 17:49:27 2009

*** 344,356 **** --- 344,359 ---- //------------------------------Key Comparator Functions--------------------- int32 cmpstr(const void *k1, const void *k2) { return strcmp((const char *)k1,(const char *)k2); } ! // Slimey cheap key comparator. ! // Cheap key comparator. int32 cmpkey(const void *key1, const void *key2) { ! return (int32)((intptr_t)key1 - (intptr_t)key2); ! if (key1 == key2) return 0; + intptr_t delta = (intptr_t)key1 - (intptr_t)key2; + if (delta > 0) return 1; + return -1; } //============================================================================= //------------------------------reset------------------------------------------ // Create an iterator and initialize the first variables.

src/share/vm/libadt/dict.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File