mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Second try at enabling hidden visibility for NS_IMETHOD on ELF platforms (bug 227537). r+sr=dbaron for the changes.
This commit is contained in:
parent
0d299b7683
commit
6e68ebaa46
@ -80,7 +80,7 @@ protected:
|
||||
};
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY default
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
|
||||
|
||||
class NS_GFX DeviceContextImpl : public nsIDeviceContext,
|
||||
public nsIObserver,
|
||||
@ -185,6 +185,6 @@ public:
|
||||
};
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY hidden
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
|
||||
|
||||
#endif /* nsDeviceContext_h___ */
|
||||
|
@ -32,7 +32,7 @@
|
||||
//class nsIPrintSettings;
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY default
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
|
||||
|
||||
//*****************************************************************************
|
||||
//*** nsPrintOptions
|
||||
@ -80,6 +80,6 @@ protected:
|
||||
};
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY hidden
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
|
||||
|
||||
#endif /* nsPrintOptions_h__ */
|
||||
|
@ -49,7 +49,7 @@
|
||||
//*****************************************************************************
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY default
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
|
||||
|
||||
class NS_GFX nsPrintSession : public nsIPrintSession,
|
||||
public nsSupportsWeakReference
|
||||
@ -65,6 +65,6 @@ public:
|
||||
};
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY hidden
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
|
||||
|
||||
#endif // nsPrintSession_h__
|
||||
|
@ -35,7 +35,7 @@
|
||||
//*****************************************************************************
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY default
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
|
||||
|
||||
class NS_GFX nsPrintSettings : public nsIPrintSettings
|
||||
{
|
||||
@ -116,6 +116,6 @@ protected:
|
||||
};
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY hidden
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
|
||||
|
||||
#endif /* nsPrintSettings_h__ */
|
||||
|
@ -52,7 +52,7 @@ typedef struct {
|
||||
} Edge;
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY default
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
|
||||
|
||||
class nsRenderingContextImpl : public nsIRenderingContext
|
||||
{
|
||||
@ -211,7 +211,7 @@ private:
|
||||
};
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY hidden
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* Class QBezierCurve, a quadratic bezier curve
|
||||
|
@ -66,7 +66,7 @@ class nsICollation;
|
||||
*/
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY default
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
|
||||
|
||||
class NS_MSG_BASE nsMsgDBFolder: public nsRDFResource,
|
||||
public nsSupportsWeakReference,
|
||||
@ -251,6 +251,6 @@ protected:
|
||||
};
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY hidden
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
|
||||
|
||||
#endif
|
||||
|
@ -62,7 +62,7 @@ class nsIMsgProtocolInfo;
|
||||
*/
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY default
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
|
||||
|
||||
class NS_MSG_BASE nsMsgIncomingServer : public nsIMsgIncomingServer,
|
||||
public nsSupportsWeakReference
|
||||
@ -116,6 +116,6 @@ protected:
|
||||
};
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY hidden
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
|
||||
|
||||
#endif // nsMsgIncomingServer_h__
|
||||
|
@ -63,7 +63,7 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY default
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
|
||||
|
||||
class NS_MSG_BASE nsMsgMailNewsUrl : public nsIMsgMailNewsUrl
|
||||
{
|
||||
@ -110,6 +110,6 @@ protected:
|
||||
};
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY hidden
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
|
||||
|
||||
#endif /* nsMsgMailNewsUrl_h___ */
|
||||
|
@ -65,7 +65,7 @@ class nsMsgFilePostHelper;
|
||||
class nsIProxyInfo;
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY default
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
|
||||
|
||||
// This is a helper class used to encapsulate code shared between all of the
|
||||
// mailnews protocol objects (imap, news, pop, smtp, etc.) In particular,
|
||||
@ -254,6 +254,6 @@ protected:
|
||||
};
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY hidden
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
|
||||
|
||||
#endif /* nsMsgProtocol_h__ */
|
||||
|
@ -52,7 +52,7 @@
|
||||
*/
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY default
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
|
||||
|
||||
class NS_MSG_BASE nsMsgTxn : public nsITransaction
|
||||
{
|
||||
@ -83,6 +83,6 @@ protected:
|
||||
};
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY hidden
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
|
||||
|
||||
#endif
|
||||
|
@ -81,34 +81,40 @@
|
||||
* wrap your class as follows:
|
||||
*
|
||||
* #undef IMETHOD_VISIBILITY
|
||||
* #define IMETHOD_VISIBILITY default
|
||||
|
||||
* #define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
|
||||
*
|
||||
* class Foo {
|
||||
* ...
|
||||
* };
|
||||
*
|
||||
* #undef IMETHOD_VISIBILITY
|
||||
* #define IMETHOD_VISIBILITY hidden
|
||||
* #define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
|
||||
*
|
||||
* Don't forget to change the visibility back to hidden before the end
|
||||
* of a header!
|
||||
*
|
||||
* Other examples:
|
||||
*
|
||||
* NS_HIDDEN_(int) someMethod();
|
||||
* SomeCtor() NS_HIDDEN;
|
||||
*/
|
||||
|
||||
#ifdef HAVE_VISIBILITY_ATTRIBUTE_notyet
|
||||
#define NS_VISIBILITY_(vis) __attribute__ ((visibility (#vis)))
|
||||
#define NS_HIDDEN_(type) type NS_VISIBILITY(hidden)
|
||||
#ifdef HAVE_VISIBILITY_ATTRIBUTE
|
||||
#define NS_VISIBILITY_HIDDEN __attribute__ ((visibility ("hidden")))
|
||||
#define NS_VISIBILITY_DEFAULT
|
||||
|
||||
#define NS_HIDDEN_(type) type NS_VISIBILITY_HIDDEN
|
||||
#else
|
||||
#define NS_VISIBILITY_(vis)
|
||||
#define NS_VISIBILITY_HIDDEN
|
||||
#define NS_VISIBILITY_DEFAULT
|
||||
|
||||
#define NS_HIDDEN_(type) type
|
||||
#endif
|
||||
|
||||
#define NS_HIDDEN NS_VISIBILITY(hidden)
|
||||
#define NS_HIDDEN NS_VISIBILITY_HIDDEN
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY hidden
|
||||
/* Extra layer of macro expansion to allow IMETHOD_VISIBILITY to be
|
||||
stringified. */
|
||||
#define NS_VISIBILITY(vis) NS_VISIBILITY_(vis)
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
|
||||
|
||||
#ifdef NS_WIN32
|
||||
|
||||
@ -140,7 +146,7 @@
|
||||
#define NS_IMPORT_(type) type
|
||||
#define NS_EXPORT
|
||||
#define NS_EXPORT_(type) type
|
||||
#define NS_IMETHOD_(type) virtual type NS_VISIBILITY(IMETHOD_VISIBILITY)
|
||||
#define NS_IMETHOD_(type) virtual type IMETHOD_VISIBILITY
|
||||
#define NS_IMETHODIMP_(type) type
|
||||
#define NS_METHOD_(type) type
|
||||
#define NS_CALLBACK_(_type, _name) _type (* _name)
|
||||
|
@ -45,7 +45,7 @@
|
||||
static const PRUint32 kAutoArraySize = 8;
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY default
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
|
||||
|
||||
class NS_COM nsSupportsArray : public nsISupportsArray {
|
||||
public:
|
||||
@ -167,6 +167,6 @@ private:
|
||||
};
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY hidden
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
|
||||
|
||||
#endif // nsSupportsArray_h__
|
||||
|
@ -30,7 +30,7 @@
|
||||
class nsWeakReference;
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY default
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
|
||||
|
||||
class NS_COM nsSupportsWeakReference : public nsISupportsWeakReference
|
||||
{
|
||||
@ -65,7 +65,7 @@ class NS_COM nsSupportsWeakReference : public nsISupportsWeakReference
|
||||
};
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY hidden
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
|
||||
|
||||
class NS_COM nsWeakReference : public nsIWeakReference
|
||||
{
|
||||
|
@ -187,7 +187,7 @@ struct nsXPTCVariant : public nsXPTCMiniVariant
|
||||
/***************************************************************************/
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY default
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT
|
||||
|
||||
class nsXPTCStubBase : public nsISupports
|
||||
{
|
||||
@ -215,7 +215,7 @@ public:
|
||||
};
|
||||
|
||||
#undef IMETHOD_VISIBILITY
|
||||
#define IMETHOD_VISIBILITY hidden
|
||||
#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user