On Thu, Nov 28, 2013 at 10:26:43PM +0000, Neil wrote:
> Can we guarantee UTF16 literals using MOZ_UTF16("wide string here")
> these days? I'm just reviewing a patch and it's using the old-style
> NS_LITERAL_STRING("wide string here").get() pattern all over.

There's only one definition of NS_LITERAL_STRING these days, and it
reads:
#define NS_LITERAL_STRING(s) static_cast<const 
nsString&>(NS_MULTILINE_LITERAL_STRING(MOZ_UTF16(s)))

See, it derives from MOZ_UTF16() :)

So yeah, NS_LITERAL_STRING("wide string here").get() is an antipattern
these days. I wonder if we shouldn't do something to prevent it.

Mike
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to