On Friday 2003-08-01 01:15 -0600, Abhilash Maniam wrote:
> I have Gecko-sdk 1.4 for windows and am using Visual C++ .NET. What is 
> the library that I have to link against for ToNewCString?
> 
> I have the following lines in my code:
> 
>   nsEmbedString name;
>   char *str;
>   domDocument->GetLocalName(name);
>   str = ToNewCString(name);

|ToNewCString| is not a frozen API.  Perhaps you'd be better off using
|strdup(name.get())|?  (Or, if using the right allocator is an issue,
maybe using nsMemory::Alloc and then strcpy?  Or do you even need the
copy at all?)

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >

Reply via email to