Bug 680868 - pldhash.cpp fails to compile on mingw-w64 r=benjamin
authorJacek Caban <jacek@codeweavers.com>
Fri, 09 Sep 2011 15:07:22 +0200
changeset 76833 5011676ea4798b2bb2a4bd673e8f6a116564344f
parent 76832 9360e5529f229d0b132bb61f83da936e5c06b0fb
child 76834 4ec6e53436e6f5e1349f3dbf8bb9faff15b2762a
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersbenjamin
bugs680868
milestone9.0a1
Bug 680868 - pldhash.cpp fails to compile on mingw-w64 r=benjamin
xpcom/glue/pldhash.cpp
--- a/xpcom/glue/pldhash.cpp
+++ b/xpcom/glue/pldhash.cpp
@@ -130,17 +130,17 @@ PL_DHashStringKey(PLDHashTable *table, c
     for (s = (const unsigned char *) key; *s != '\0'; s++)
         h = PR_ROTATE_LEFT32(h, 4) ^ *s;
     return h;
 }
 
 PLDHashNumber
 PL_DHashVoidPtrKeyStub(PLDHashTable *table, const void *key)
 {
-    return (PLDHashNumber)(unsigned long)key >> 2;
+    return (PLDHashNumber)(PRPtrdiff)key >> 2;
 }
 
 PRBool
 PL_DHashMatchEntryStub(PLDHashTable *table,
                        const PLDHashEntryHdr *entry,
                        const void *key)
 {
     const PLDHashEntryStub *stub = (const PLDHashEntryStub *)entry;