From 5a4f28eb7bc2c3a62cd433d629e57fd1f4e1675a Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 9 Aug 2012 09:09:31 +0200 Subject: [PATCH] Bug 780387 - Part a: Stop using PRPtrdiff; r=bsmedberg --- xpcom/glue/nsTArray-inl.h | 2 +- xpcom/glue/pldhash.cpp | 2 +- xpcom/tests/TestTArray.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xpcom/glue/nsTArray-inl.h b/xpcom/glue/nsTArray-inl.h index a7f0f05f3d2..b56244c4148 100644 --- a/xpcom/glue/nsTArray-inl.h +++ b/xpcom/glue/nsTArray-inl.h @@ -87,7 +87,7 @@ bool nsTArray_base::UsesAutoArrayBuffer() const { "see comment above"); #ifdef DEBUG - PRPtrdiff diff = reinterpret_cast(GetAutoArrayBuffer(8)) - + ptrdiff_t diff = reinterpret_cast(GetAutoArrayBuffer(8)) - reinterpret_cast(GetAutoArrayBuffer(4)); NS_ABORT_IF_FALSE(diff >= 0 && diff <= 4, "GetAutoArrayBuffer doesn't do what we expect."); #endif diff --git a/xpcom/glue/pldhash.cpp b/xpcom/glue/pldhash.cpp index e9fdda20e0b..f53b8c45e75 100644 --- a/xpcom/glue/pldhash.cpp +++ b/xpcom/glue/pldhash.cpp @@ -97,7 +97,7 @@ PL_DHashStringKey(PLDHashTable *table, const void *key) PLDHashNumber PL_DHashVoidPtrKeyStub(PLDHashTable *table, const void *key) { - return (PLDHashNumber)(PRPtrdiff)key >> 2; + return (PLDHashNumber)(ptrdiff_t)key >> 2; } bool diff --git a/xpcom/tests/TestTArray.cpp b/xpcom/tests/TestTArray.cpp index 424ab5f5d22..1e1f73f292c 100644 --- a/xpcom/tests/TestTArray.cpp +++ b/xpcom/tests/TestTArray.cpp @@ -556,7 +556,7 @@ static bool test_heap() { #define IS_USING_AUTO(arr) \ ((uintptr_t) &(arr) < (uintptr_t) arr.Elements() && \ - ((PRPtrdiff)arr.Elements() - (PRPtrdiff)&arr) <= 16) + ((ptrdiff_t)arr.Elements() - (ptrdiff_t)&arr) <= 16) #define CHECK_IS_USING_AUTO(arr) \ do { \