From dd17908843420019aefb7d662b47634bc6e9753e Mon Sep 17 00:00:00 2001 From: "scc%mozilla.org" Date: Wed, 23 May 2001 01:45:13 +0000 Subject: [PATCH] bug #63923: sr=sfraser, r=waterson (aka ``thrill-kitty''), casting to an abstract base prevents people on crack-baby platforms from using an |NS_LITERAL_STRING| (incompatibly) as an |nsAutoString|. Who's ready for a full rebuild? git-svn-id: svn://10.0.0.236/trunk@95769 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/string/public/nsLiteralString.h | 2 +- mozilla/xpcom/string/public/nsLiteralString.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/string/public/nsLiteralString.h b/mozilla/string/public/nsLiteralString.h index 553e96902bf..82efc76d296 100644 --- a/mozilla/string/public/nsLiteralString.h +++ b/mozilla/string/public/nsLiteralString.h @@ -78,7 +78,7 @@ literal_string( const char* aPtr, PRUint32 aLength ) #define NS_NAMED_MULTILINE_LITERAL_STRING(n,s) NS_ConvertASCIItoUCS2 n(s, PRUint32(sizeof(s)-1)) #endif -#define NS_LITERAL_STRING(s) NS_MULTILINE_LITERAL_STRING(NS_L(s)) +#define NS_LITERAL_STRING(s) NS_STATIC_CAST(const nsAFlatString&, NS_MULTILINE_LITERAL_STRING(NS_L(s))) #define NS_NAMED_LITERAL_STRING(n,s) NS_NAMED_MULTILINE_LITERAL_STRING(n,NS_L(s)) #define NS_LITERAL_CSTRING(s) nsDependentCString(s, PRUint32(sizeof(s)-1)) diff --git a/mozilla/xpcom/string/public/nsLiteralString.h b/mozilla/xpcom/string/public/nsLiteralString.h index 553e96902bf..82efc76d296 100644 --- a/mozilla/xpcom/string/public/nsLiteralString.h +++ b/mozilla/xpcom/string/public/nsLiteralString.h @@ -78,7 +78,7 @@ literal_string( const char* aPtr, PRUint32 aLength ) #define NS_NAMED_MULTILINE_LITERAL_STRING(n,s) NS_ConvertASCIItoUCS2 n(s, PRUint32(sizeof(s)-1)) #endif -#define NS_LITERAL_STRING(s) NS_MULTILINE_LITERAL_STRING(NS_L(s)) +#define NS_LITERAL_STRING(s) NS_STATIC_CAST(const nsAFlatString&, NS_MULTILINE_LITERAL_STRING(NS_L(s))) #define NS_NAMED_LITERAL_STRING(n,s) NS_NAMED_MULTILINE_LITERAL_STRING(n,NS_L(s)) #define NS_LITERAL_CSTRING(s) nsDependentCString(s, PRUint32(sizeof(s)-1))