[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] gnash ChangeLog server/asobj/Global.cpp testsui...

From: strk
Subject: Re: [Gnash-commit] gnash ChangeLog server/asobj/Global.cpp testsui...
Date: Thu, 1 Feb 2007 22:43:08 +0100

On Thu, Feb 01, 2007 at 08:37:50PM +0000, Martin Guy wrote:

> >> +    string input = fn.arg(0).to_string();
> >
> >Note that to_string() might return NULL, in which case
> >the std::string constructor will segfault.
> Wot, even if fn.nargs==1 ?

mm.. maybe I was wrong. It seems that as_value::to_string() 
returns to_tu_string().c_str(), which is likely to never
be NULL. Documentation fo that function lacks a warranty about
this thought. Consider using to_std_string(), I added it some
time ago for exactly this reason (reducing confusion).
The downside of to_std_string() is that it currently
returns by value... would be better once we change m_string_value
from a tu_stringi to a std::string.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]