Re: nsString

2011-12-05 Thread Igor Tandetnik
On 12/4/2011 9:23 PM, FrAnk Alvin wrote: nsString attributeName char* attrName = NS_ConvertUTF16toUTF8(attributeName).get(); This creates a temporary instance of NS_ConvertUTF16toUTF8. At the semicolon, this temporary is destroyed, deallocating the memory and leaving attrName a dangling

Re: nsString

2011-12-05 Thread Alvin4u
On 12月6日, 上午2时18分, Igor Tandetnik itandet...@mvps.org wrote: On 12/4/2011 9:23 PM, FrAnk Alvin wrote: nsString attributeName char* attrName = NS_ConvertUTF16toUTF8(attributeName).get(); This creates a temporary instance of NS_ConvertUTF16toUTF8. At the semicolon, this temporary

Re: nsString

2011-12-04 Thread FrAnk Alvin
On 11月28日, 下午6时36分, philippe pa510...@exchange.france.ncr.com wrote: Hello. I built a browser with gecko 1.8 . It worked fine. Now I try to use gecko 1.9.2.23. I get some conversions problems For example: __ nsString attributeName char* attrName=ToNewCString(attributeName

Re: nsString

2011-11-29 Thread Benjamin Smedberg
On 11/28/2011 5:36 AM, philippe wrote: Hello. I built a browser with gecko 1.8 . It worked fine. Now I try to use gecko 1.9.2.23. I get some conversions problems For example: __ nsString attributeName char* attrName=ToNewCString(attributeName); causes an error : cannot convert