From c3d98e9face2e4515eaec739ccd4b275fab11629 Mon Sep 17 00:00:00 2001 From: "jdunn%netscape.com" Date: Mon, 12 Apr 1999 20:12:15 +0000 Subject: [PATCH] ANSIC requires that structures need 'friend' status to access other structures IF they are protected (or private). fix for bug 4642 git-svn-id: svn://10.0.0.236/trunk@27180 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsLineLayout.h | 13 +++++-------- mozilla/layout/html/base/src/nsLineLayout.h | 13 +++++-------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/mozilla/layout/generic/nsLineLayout.h b/mozilla/layout/generic/nsLineLayout.h index 72ec853c36a..706f758e13b 100644 --- a/mozilla/layout/generic/nsLineLayout.h +++ b/mozilla/layout/generic/nsLineLayout.h @@ -246,10 +246,10 @@ protected: // has completed (vertical alignment, horizontal alignment, // justification and relative positioning). -#ifdef AIX -public: -#endif /* AIX */ struct PerSpanData; + struct PerFrameData; + friend struct PerSpanData; + friend struct PerFrameData; struct PerFrameData { // link to next/prev frame in same span PerFrameData* mNext; @@ -277,16 +277,13 @@ public: // Other state we use PRUint8 mVerticalAlign; }; -#ifdef AIX -protected: -#endif /* AIX */ PerFrameData mFrameDataBuf[NS_LINELAYOUT_NUM_FRAMES]; PerFrameData* mFrameFreeList; PRInt32 mInitialFramesFreed; #ifdef AIX public: -#endif /* AIX */ +#endif struct PerSpanData { union { PerSpanData* mParent; @@ -321,7 +318,7 @@ public: }; #ifdef AIX protected: -#endif /* AIX */ +#endif PerSpanData mSpanDataBuf[NS_LINELAYOUT_NUM_SPANS]; PerSpanData* mSpanFreeList; PRInt32 mInitialSpansFreed; diff --git a/mozilla/layout/html/base/src/nsLineLayout.h b/mozilla/layout/html/base/src/nsLineLayout.h index 72ec853c36a..706f758e13b 100644 --- a/mozilla/layout/html/base/src/nsLineLayout.h +++ b/mozilla/layout/html/base/src/nsLineLayout.h @@ -246,10 +246,10 @@ protected: // has completed (vertical alignment, horizontal alignment, // justification and relative positioning). -#ifdef AIX -public: -#endif /* AIX */ struct PerSpanData; + struct PerFrameData; + friend struct PerSpanData; + friend struct PerFrameData; struct PerFrameData { // link to next/prev frame in same span PerFrameData* mNext; @@ -277,16 +277,13 @@ public: // Other state we use PRUint8 mVerticalAlign; }; -#ifdef AIX -protected: -#endif /* AIX */ PerFrameData mFrameDataBuf[NS_LINELAYOUT_NUM_FRAMES]; PerFrameData* mFrameFreeList; PRInt32 mInitialFramesFreed; #ifdef AIX public: -#endif /* AIX */ +#endif struct PerSpanData { union { PerSpanData* mParent; @@ -321,7 +318,7 @@ public: }; #ifdef AIX protected: -#endif /* AIX */ +#endif PerSpanData mSpanDataBuf[NS_LINELAYOUT_NUM_SPANS]; PerSpanData* mSpanFreeList; PRInt32 mInitialSpansFreed;