зеркало из https://github.com/mozilla/pjs.git
fixing hpux bustage. unnamed unions can't access structs which are protected.
making FragmentBits a public struct, but the variable of this type is still private. The other solution would be to "name" the union and delcare FragmentBits a friend of the union (the union has to be named to declare friendship).
This commit is contained in:
Родитель
27cf82446b
Коммит
7c6ce1d057
|
@ -218,6 +218,12 @@ public:
|
|||
return mState.mIs2b ? m2b[aIndex] : PRUnichar(m1b[aIndex]);
|
||||
}
|
||||
|
||||
struct FragmentBits {
|
||||
PRBool mInHeap : 1;
|
||||
PRBool mIs2b : 1;
|
||||
PRUint32 mLength : 30;
|
||||
};
|
||||
|
||||
protected:
|
||||
void ReleaseText();
|
||||
|
||||
|
@ -228,11 +234,7 @@ protected:
|
|||
|
||||
union {
|
||||
PRUint32 mAllBits;
|
||||
struct {
|
||||
PRBool mInHeap : 1;
|
||||
PRBool mIs2b : 1;
|
||||
PRUint32 mLength : 30;
|
||||
} mState;
|
||||
FragmentBits mState;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -218,6 +218,12 @@ public:
|
|||
return mState.mIs2b ? m2b[aIndex] : PRUnichar(m1b[aIndex]);
|
||||
}
|
||||
|
||||
struct FragmentBits {
|
||||
PRBool mInHeap : 1;
|
||||
PRBool mIs2b : 1;
|
||||
PRUint32 mLength : 30;
|
||||
};
|
||||
|
||||
protected:
|
||||
void ReleaseText();
|
||||
|
||||
|
@ -228,11 +234,7 @@ protected:
|
|||
|
||||
union {
|
||||
PRUint32 mAllBits;
|
||||
struct {
|
||||
PRBool mInHeap : 1;
|
||||
PRBool mIs2b : 1;
|
||||
PRUint32 mLength : 30;
|
||||
} mState;
|
||||
FragmentBits mState;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче