Bug 796119 - part 1: don't use PR_BIT in pldhash.h; r=ehsan
authorNathan Froyd <froydnj@mozilla.com>
Mon, 01 Oct 2012 17:04:37 -0400
changeset 109162 715eda9ee77298088e1abf5b8528032a9c2e1d08
parent 109161 8a788d3eccd155b2a2029f3223b0a3e224e0e225
child 109163 a0f4ab91ee37cd2cfca79747fd35936baacc3283
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersehsan
bugs796119
milestone18.0a1
Bug 796119 - part 1: don't use PR_BIT in pldhash.h; r=ehsan
xpcom/glue/pldhash.h
--- a/xpcom/glue/pldhash.h
+++ b/xpcom/glue/pldhash.h
@@ -26,17 +26,17 @@ extern "C" {
 #endif
 
 #ifdef DEBUG_XXXbrendan
 #define PL_DHASHMETER 1
 #endif
 
 /* Table size limit, do not equal or exceed (see min&maxAlphaFrac, below). */
 #undef PL_DHASH_SIZE_LIMIT
-#define PL_DHASH_SIZE_LIMIT     PR_BIT(24)
+#define PL_DHASH_SIZE_LIMIT     ((uint32_t)1 << 24)
 
 /* Minimum table size, or gross entry count (net is at most .75 loaded). */
 #ifndef PL_DHASH_MIN_SIZE
 #define PL_DHASH_MIN_SIZE 16
 #elif (PL_DHASH_MIN_SIZE & (PL_DHASH_MIN_SIZE - 1)) != 0
 #error "PL_DHASH_MIN_SIZE must be a power of two!"
 #endif
 
@@ -197,17 +197,18 @@ struct PLDHashTable {
 #endif
 };
 
 /*
  * Size in entries (gross, not net of free and removed sentinels) for table.
  * We store hashShift rather than sizeLog2 to optimize the collision-free case
  * in SearchTable.
  */
-#define PL_DHASH_TABLE_SIZE(table)  PR_BIT(PL_DHASH_BITS - (table)->hashShift)
+#define PL_DHASH_TABLE_SIZE(table) \
+    ((uint32_t)1 << (PL_DHASH_BITS - (table)->hashShift))
 
 /*
  * Table space at entryStore is allocated and freed using these callbacks.
  * The allocator should return null on error only (not if called with nbytes
  * equal to 0; but note that pldhash.c code will never call with 0 nbytes).
  */
 typedef void *
 (* PLDHashAllocTable)(PLDHashTable *table, uint32_t nbytes);