Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg

This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
This commit is contained in:
Ehsan Akhgari
2012-08-22 11:56:38 -04:00
parent 267ef7575d
commit 243c878d26
4098 changed files with 54923 additions and 54923 deletions

View File

@@ -62,7 +62,7 @@ nsBaseAppShell::Init()
void
nsBaseAppShell::NativeEventCallback()
{
PRInt32 hasPending = PR_ATOMIC_SET(&mNativeEventPending, 0);
int32_t hasPending = PR_ATOMIC_SET(&mNativeEventPending, 0);
if (hasPending == 0)
return;
@@ -118,7 +118,7 @@ nsBaseAppShell::DoProcessMoreGeckoEvents()
// Main thread via OnProcessNextEvent below
bool
nsBaseAppShell::DoProcessNextNativeEvent(bool mayWait, PRUint32 recursionDepth)
nsBaseAppShell::DoProcessNextNativeEvent(bool mayWait, uint32_t recursionDepth)
{
// The next native event to be processed may trigger our NativeEventCallback,
// in which case we do not want it to process any thread events since we'll
@@ -180,7 +180,7 @@ nsBaseAppShell::Exit(void)
NS_IMETHODIMP
nsBaseAppShell::FavorPerformanceHint(bool favorPerfOverStarvation,
PRUint32 starvationDelay)
uint32_t starvationDelay)
{
mStarvationDelay = PR_MillisecondsToInterval(starvationDelay);
if (favorPerfOverStarvation) {
@@ -208,7 +208,7 @@ nsBaseAppShell::ResumeNative()
}
NS_IMETHODIMP
nsBaseAppShell::GetEventloopNestingLevel(PRUint32* aNestingLevelResult)
nsBaseAppShell::GetEventloopNestingLevel(uint32_t* aNestingLevelResult)
{
NS_ENSURE_ARG_POINTER(aNestingLevelResult);
@@ -227,7 +227,7 @@ nsBaseAppShell::OnDispatchedEvent(nsIThreadInternal *thr)
if (mBlockNativeEvent)
return NS_OK;
PRInt32 lastVal = PR_ATOMIC_SET(&mNativeEventPending, 1);
int32_t lastVal = PR_ATOMIC_SET(&mNativeEventPending, 1);
if (lastVal == 1)
return NS_OK;
@@ -239,7 +239,7 @@ nsBaseAppShell::OnDispatchedEvent(nsIThreadInternal *thr)
// Called from the main thread
NS_IMETHODIMP
nsBaseAppShell::OnProcessNextEvent(nsIThreadInternal *thr, bool mayWait,
PRUint32 recursionDepth)
uint32_t recursionDepth)
{
if (mBlockNativeEvent) {
if (!mayWait)
@@ -327,7 +327,7 @@ nsBaseAppShell::DispatchDummyEvent(nsIThread* aTarget)
void
nsBaseAppShell::RunSyncSectionsInternal(bool aStable,
PRUint32 aThreadRecursionLevel)
uint32_t aThreadRecursionLevel)
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
NS_ASSERTION(!mSyncSections.IsEmpty(), "Nothing to do!");
@@ -343,7 +343,7 @@ nsBaseAppShell::RunSyncSectionsInternal(bool aStable,
nsTArray<SyncSection> pendingSyncSections;
for (PRUint32 i = 0; i < mSyncSections.Length(); i++) {
for (uint32_t i = 0; i < mSyncSections.Length(); i++) {
SyncSection& section = mSyncSections[i];
if ((aStable && section.mStable) ||
(!section.mStable &&
@@ -383,7 +383,7 @@ nsBaseAppShell::ScheduleSyncSection(nsIRunnable* aRunnable, bool aStable)
nsCOMPtr<nsIThreadInternal> threadInternal = do_QueryInterface(thread);
NS_ASSERTION(threadInternal, "This should never fail!");
PRUint32 recursionLevel;
uint32_t recursionLevel;
if (NS_FAILED(threadInternal->GetRecursionDepth(&recursionLevel))) {
NS_ERROR("This should never fail!");
}
@@ -402,7 +402,7 @@ nsBaseAppShell::ScheduleSyncSection(nsIRunnable* aRunnable, bool aStable)
// Called from the main thread
NS_IMETHODIMP
nsBaseAppShell::AfterProcessNextEvent(nsIThreadInternal *thr,
PRUint32 recursionDepth)
uint32_t recursionDepth)
{
// We've just finished running an event, so we're in a stable state.
RunSyncSections(true, recursionDepth);