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:
@@ -346,7 +346,7 @@ PluginScriptableObjectChild::ScriptableEnumerate(NPObject* aObject,
|
||||
return false;
|
||||
}
|
||||
|
||||
for (PRUint32 index = 0; index < *aCount; index++) {
|
||||
for (uint32_t index = 0; index < *aCount; index++) {
|
||||
(*aIdentifiers)[index] =
|
||||
static_cast<PPluginIdentifierChild*>(identifiers[index]);
|
||||
}
|
||||
@@ -662,7 +662,7 @@ PluginScriptableObjectChild::AnswerInvoke(PPluginIdentifierChild* aId,
|
||||
}
|
||||
|
||||
nsAutoTArray<NPVariant, 10> convertedArgs;
|
||||
PRUint32 argCount = aArgs.Length();
|
||||
uint32_t argCount = aArgs.Length();
|
||||
|
||||
if (!convertedArgs.SetLength(argCount)) {
|
||||
*aResult = void_t();
|
||||
@@ -670,7 +670,7 @@ PluginScriptableObjectChild::AnswerInvoke(PPluginIdentifierChild* aId,
|
||||
return true;
|
||||
}
|
||||
|
||||
for (PRUint32 index = 0; index < argCount; index++) {
|
||||
for (uint32_t index = 0; index < argCount; index++) {
|
||||
ConvertToVariant(aArgs[index], convertedArgs[index]);
|
||||
}
|
||||
|
||||
@@ -681,7 +681,7 @@ PluginScriptableObjectChild::AnswerInvoke(PPluginIdentifierChild* aId,
|
||||
convertedArgs.Elements(), argCount,
|
||||
&result);
|
||||
|
||||
for (PRUint32 index = 0; index < argCount; index++) {
|
||||
for (uint32_t index = 0; index < argCount; index++) {
|
||||
PluginModuleChild::sBrowserFuncs.releasevariantvalue(&convertedArgs[index]);
|
||||
}
|
||||
|
||||
@@ -732,7 +732,7 @@ PluginScriptableObjectChild::AnswerInvokeDefault(const InfallibleTArray<Variant>
|
||||
}
|
||||
|
||||
nsAutoTArray<NPVariant, 10> convertedArgs;
|
||||
PRUint32 argCount = aArgs.Length();
|
||||
uint32_t argCount = aArgs.Length();
|
||||
|
||||
if (!convertedArgs.SetLength(argCount)) {
|
||||
*aResult = void_t();
|
||||
@@ -740,7 +740,7 @@ PluginScriptableObjectChild::AnswerInvokeDefault(const InfallibleTArray<Variant>
|
||||
return true;
|
||||
}
|
||||
|
||||
for (PRUint32 index = 0; index < argCount; index++) {
|
||||
for (uint32_t index = 0; index < argCount; index++) {
|
||||
ConvertToVariant(aArgs[index], convertedArgs[index]);
|
||||
}
|
||||
|
||||
@@ -750,7 +750,7 @@ PluginScriptableObjectChild::AnswerInvokeDefault(const InfallibleTArray<Variant>
|
||||
convertedArgs.Elements(),
|
||||
argCount, &result);
|
||||
|
||||
for (PRUint32 index = 0; index < argCount; index++) {
|
||||
for (uint32_t index = 0; index < argCount; index++) {
|
||||
PluginModuleChild::sBrowserFuncs.releasevariantvalue(&convertedArgs[index]);
|
||||
}
|
||||
|
||||
@@ -988,7 +988,7 @@ PluginScriptableObjectChild::AnswerConstruct(const InfallibleTArray<Variant>& aA
|
||||
}
|
||||
|
||||
nsAutoTArray<NPVariant, 10> convertedArgs;
|
||||
PRUint32 argCount = aArgs.Length();
|
||||
uint32_t argCount = aArgs.Length();
|
||||
|
||||
if (!convertedArgs.SetLength(argCount)) {
|
||||
*aResult = void_t();
|
||||
@@ -996,7 +996,7 @@ PluginScriptableObjectChild::AnswerConstruct(const InfallibleTArray<Variant>& aA
|
||||
return true;
|
||||
}
|
||||
|
||||
for (PRUint32 index = 0; index < argCount; index++) {
|
||||
for (uint32_t index = 0; index < argCount; index++) {
|
||||
ConvertToVariant(aArgs[index], convertedArgs[index]);
|
||||
}
|
||||
|
||||
@@ -1005,7 +1005,7 @@ PluginScriptableObjectChild::AnswerConstruct(const InfallibleTArray<Variant>& aA
|
||||
bool success = mObject->_class->construct(mObject, convertedArgs.Elements(),
|
||||
argCount, &result);
|
||||
|
||||
for (PRUint32 index = 0; index < argCount; index++) {
|
||||
for (uint32_t index = 0; index < argCount; index++) {
|
||||
PluginModuleChild::sBrowserFuncs.releasevariantvalue(&convertedArgs[index]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user