From 858a24815d8ea3fbbad258dd050bfe2f6ebe4ee0 Mon Sep 17 00:00:00 2001 From: Benjamin Smedberg Date: Thu, 1 May 2008 15:12:33 -0400 Subject: [PATCH] Bug 431677 - outparam errors in netwerk/cookie, r=dmandelin --- xpcom/analysis/outparams.js | 4 ++-- xpcom/base/nscore.h | 26 +++++++++++++------------- xpcom/glue/nsArrayEnumerator.h | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/xpcom/analysis/outparams.js b/xpcom/analysis/outparams.js index 61ab66a8cd25..196beea69ab9 100644 --- a/xpcom/analysis/outparams.js +++ b/xpcom/analysis/outparams.js @@ -685,9 +685,9 @@ function param_semantics(decl) { for each (let attr in rectify_attributes(DECL_ATTRIBUTES(decl))) { if (attr.name == 'user') { for each (let arg in attr.args) { - if (arg == 'outparam') { + if (arg == 'NS_outparam') { return ps.OUT; - } else if (arg == 'inoutparam') { + } else if (arg == 'NS_inoutparam') { return ps.INOUT; } } diff --git a/xpcom/base/nscore.h b/xpcom/base/nscore.h index 878fdf1163d9..cf7e1f4f5792 100644 --- a/xpcom/base/nscore.h +++ b/xpcom/base/nscore.h @@ -255,19 +255,6 @@ # define NS_DEPRECATED #endif -/** - * Attributes defined to help Dehydra GCC analysis. - */ -#ifdef STATIC_CHECKING -# define NS_SCRIPTABLE __attribute__((user("NS_script"))) -# define NS_OUTPARAM __attribute__((user("NS_outparam"))) -# define NS_INOUTPARAM __attribute__((user("NS_inoutparam"))) -#else -# define NS_SCRIPTABLE -# define NS_OUTPARAM -# define NS_INOUTPARAM -#endif - /** * Generic API modifiers which return the standard XPCOM nsresult type */ @@ -509,4 +496,17 @@ typedef PRUint32 nsrefcnt; #define NS_FINAL_CLASS #endif +/** + * Attributes defined to help Dehydra GCC analysis. + */ +#ifdef NS_STATIC_CHECKING +# define NS_SCRIPTABLE __attribute__((user("NS_script"))) +# define NS_OUTPARAM __attribute__((user("NS_outparam"))) +# define NS_INOUTPARAM __attribute__((user("NS_inoutparam"))) +#else +# define NS_SCRIPTABLE +# define NS_OUTPARAM +# define NS_INOUTPARAM +#endif + #endif /* nscore_h___ */ diff --git a/xpcom/glue/nsArrayEnumerator.h b/xpcom/glue/nsArrayEnumerator.h index dba8a4575c78..d7b3699e7b0a 100644 --- a/xpcom/glue/nsArrayEnumerator.h +++ b/xpcom/glue/nsArrayEnumerator.h @@ -51,7 +51,7 @@ class nsCOMArray_base; // Create an enumerator for an existing nsIArray implementation // The enumerator holds an owning reference to the array. NS_COM_GLUE nsresult -NS_NewArrayEnumerator(nsISimpleEnumerator* *result, +NS_NewArrayEnumerator(nsISimpleEnumerator* *result NS_OUTPARAM, nsIArray* array); // create an enumerator for an existing nsCOMArray implementation @@ -59,7 +59,7 @@ NS_NewArrayEnumerator(nsISimpleEnumerator* *result, // the array. This means that the nsCOMArray can safely go away // without its objects going away. NS_COM_GLUE nsresult -NS_NewArrayEnumerator(nsISimpleEnumerator* *aResult, +NS_NewArrayEnumerator(nsISimpleEnumerator* *aResult NS_OUTPARAM, const nsCOMArray_base& aArray); #endif