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 76812 5011676ea4798b2bb2a4bd673e8f6a116564344f
parent 76811 9360e5529f229d0b132bb61f83da936e5c06b0fb
child 76813 4ec6e53436e6f5e1349f3dbf8bb9faff15b2762a
push id1835
push userjacek@codeweavers.com
push dateFri, 09 Sep 2011 13:15:48 +0000
treeherdermozilla-inbound@c4d9981dc228 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbenjamin
bugs680868
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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;