зеркало из https://github.com/mozilla/gecko-dev.git
bug #76846: r=cls, build bustage fix for 64-bit platforms
This commit is contained in:
Родитель
5709f7405c
Коммит
1ab59fad3a
|
@ -65,20 +65,20 @@ class NS_COM nsDependentConcatenation
|
|||
int
|
||||
GetCurrentStringFromFragment( const nsReadableFragment<char_type>& aFragment ) const
|
||||
{
|
||||
return (NS_REINTERPRET_CAST(PRUint32, aFragment.mFragmentIdentifier) & mFragmentIdentifierMask) ? kRightString : kLeftString;
|
||||
return (aFragment.GetIDAsInt() & mFragmentIdentifierMask) ? kRightString : kLeftString;
|
||||
}
|
||||
|
||||
int
|
||||
SetLeftStringInFragment( nsReadableFragment<char_type>& aFragment ) const
|
||||
{
|
||||
aFragment.mFragmentIdentifier = NS_REINTERPRET_CAST(void*, NS_REINTERPRET_CAST(PRUint32, aFragment.mFragmentIdentifier) & ~mFragmentIdentifierMask);
|
||||
aFragment.SetID(aFragment.GetIDAsInt() & ~mFragmentIdentifierMask);
|
||||
return kLeftString;
|
||||
}
|
||||
|
||||
int
|
||||
SetRightStringInFragment( nsReadableFragment<char_type>& aFragment ) const
|
||||
{
|
||||
aFragment.mFragmentIdentifier = NS_REINTERPRET_CAST(void*, NS_REINTERPRET_CAST(PRUint32, aFragment.mFragmentIdentifier) | mFragmentIdentifierMask);
|
||||
aFragment.SetID(aFragment.GetIDAsInt() | mFragmentIdentifierMask);
|
||||
return kRightString;
|
||||
}
|
||||
|
||||
|
@ -142,20 +142,20 @@ class NS_COM nsDependentCConcatenation
|
|||
int
|
||||
GetCurrentStringFromFragment( const nsReadableFragment<char_type>& aFragment ) const
|
||||
{
|
||||
return (NS_REINTERPRET_CAST(PRUint32, aFragment.mFragmentIdentifier) & mFragmentIdentifierMask) ? kRightString : kLeftString;
|
||||
return (aFragment.GetIDAsInt() & mFragmentIdentifierMask) ? kRightString : kLeftString;
|
||||
}
|
||||
|
||||
int
|
||||
SetLeftStringInFragment( nsReadableFragment<char_type>& aFragment ) const
|
||||
{
|
||||
aFragment.mFragmentIdentifier = NS_REINTERPRET_CAST(void*, NS_REINTERPRET_CAST(PRUint32, aFragment.mFragmentIdentifier) & ~mFragmentIdentifierMask);
|
||||
aFragment.SetID(aFragment.GetIDAsInt() & ~mFragmentIdentifierMask);
|
||||
return kLeftString;
|
||||
}
|
||||
|
||||
int
|
||||
SetRightStringInFragment( nsReadableFragment<char_type>& aFragment ) const
|
||||
{
|
||||
aFragment.mFragmentIdentifier = NS_REINTERPRET_CAST(void*, NS_REINTERPRET_CAST(PRUint32, aFragment.mFragmentIdentifier) | mFragmentIdentifierMask);
|
||||
aFragment.SetID(aFragment.GetIDAsInt() | mFragmentIdentifierMask);
|
||||
return kRightString;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,34 @@ struct nsReadableFragment
|
|||
{
|
||||
// nothing else to do here
|
||||
}
|
||||
|
||||
void*
|
||||
GetID() const
|
||||
{
|
||||
return mFragmentIdentifier;
|
||||
}
|
||||
|
||||
unsigned long
|
||||
GetIDAsInt() const
|
||||
{
|
||||
typedef char* char_ptr;
|
||||
typedef unsigned long ulong;
|
||||
return ulong(char_ptr(mFragmentIdentifier)-char_ptr(0));
|
||||
}
|
||||
|
||||
void
|
||||
SetID( void* id )
|
||||
{
|
||||
mFragmentidentifier = id;
|
||||
}
|
||||
|
||||
void
|
||||
SetID( unsigned long id )
|
||||
{
|
||||
typedef char* char_ptr;
|
||||
typedef void* void_ptr;
|
||||
mFragmentIdentifier = void_ptr(char_ptr(0)+id);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -65,20 +65,20 @@ class NS_COM nsDependentConcatenation
|
|||
int
|
||||
GetCurrentStringFromFragment( const nsReadableFragment<char_type>& aFragment ) const
|
||||
{
|
||||
return (NS_REINTERPRET_CAST(PRUint32, aFragment.mFragmentIdentifier) & mFragmentIdentifierMask) ? kRightString : kLeftString;
|
||||
return (aFragment.GetIDAsInt() & mFragmentIdentifierMask) ? kRightString : kLeftString;
|
||||
}
|
||||
|
||||
int
|
||||
SetLeftStringInFragment( nsReadableFragment<char_type>& aFragment ) const
|
||||
{
|
||||
aFragment.mFragmentIdentifier = NS_REINTERPRET_CAST(void*, NS_REINTERPRET_CAST(PRUint32, aFragment.mFragmentIdentifier) & ~mFragmentIdentifierMask);
|
||||
aFragment.SetID(aFragment.GetIDAsInt() & ~mFragmentIdentifierMask);
|
||||
return kLeftString;
|
||||
}
|
||||
|
||||
int
|
||||
SetRightStringInFragment( nsReadableFragment<char_type>& aFragment ) const
|
||||
{
|
||||
aFragment.mFragmentIdentifier = NS_REINTERPRET_CAST(void*, NS_REINTERPRET_CAST(PRUint32, aFragment.mFragmentIdentifier) | mFragmentIdentifierMask);
|
||||
aFragment.SetID(aFragment.GetIDAsInt() | mFragmentIdentifierMask);
|
||||
return kRightString;
|
||||
}
|
||||
|
||||
|
@ -142,20 +142,20 @@ class NS_COM nsDependentCConcatenation
|
|||
int
|
||||
GetCurrentStringFromFragment( const nsReadableFragment<char_type>& aFragment ) const
|
||||
{
|
||||
return (NS_REINTERPRET_CAST(PRUint32, aFragment.mFragmentIdentifier) & mFragmentIdentifierMask) ? kRightString : kLeftString;
|
||||
return (aFragment.GetIDAsInt() & mFragmentIdentifierMask) ? kRightString : kLeftString;
|
||||
}
|
||||
|
||||
int
|
||||
SetLeftStringInFragment( nsReadableFragment<char_type>& aFragment ) const
|
||||
{
|
||||
aFragment.mFragmentIdentifier = NS_REINTERPRET_CAST(void*, NS_REINTERPRET_CAST(PRUint32, aFragment.mFragmentIdentifier) & ~mFragmentIdentifierMask);
|
||||
aFragment.SetID(aFragment.GetIDAsInt() & ~mFragmentIdentifierMask);
|
||||
return kLeftString;
|
||||
}
|
||||
|
||||
int
|
||||
SetRightStringInFragment( nsReadableFragment<char_type>& aFragment ) const
|
||||
{
|
||||
aFragment.mFragmentIdentifier = NS_REINTERPRET_CAST(void*, NS_REINTERPRET_CAST(PRUint32, aFragment.mFragmentIdentifier) | mFragmentIdentifierMask);
|
||||
aFragment.SetID(aFragment.GetIDAsInt() | mFragmentIdentifierMask);
|
||||
return kRightString;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,34 @@ struct nsReadableFragment
|
|||
{
|
||||
// nothing else to do here
|
||||
}
|
||||
|
||||
void*
|
||||
GetID() const
|
||||
{
|
||||
return mFragmentIdentifier;
|
||||
}
|
||||
|
||||
unsigned long
|
||||
GetIDAsInt() const
|
||||
{
|
||||
typedef char* char_ptr;
|
||||
typedef unsigned long ulong;
|
||||
return ulong(char_ptr(mFragmentIdentifier)-char_ptr(0));
|
||||
}
|
||||
|
||||
void
|
||||
SetID( void* id )
|
||||
{
|
||||
mFragmentidentifier = id;
|
||||
}
|
||||
|
||||
void
|
||||
SetID( unsigned long id )
|
||||
{
|
||||
typedef char* char_ptr;
|
||||
typedef void* void_ptr;
|
||||
mFragmentIdentifier = void_ptr(char_ptr(0)+id);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче