On Sun, Nov 25, 2007 at 09:19:20AM -0800, chromatic wrote:
> On Sunday 25 November 2007 07:15:01 Patrick R. Michaud wrote:
> > What's the difference between CONST_STRING and string_from_literal?
> > In particular, which one should be used when?  In some code I see
> > things like:
> >
> >     #  src/pmc/exporter.pmc
> >     STRING *s_hash      = CONST_STRING(interp, "hash");
> >
> > and in others we have
> >
> >     # src/pmc/codestring.pmc
> >     STRING *percent     = string_from_literal(INTERP, "%");
> 
> CONST_STRING() is 100% more awesome, because it's completely constant.  
> [...]
> PDD 15 branch after replacing string_from_literal() with CONST_STRING().  
> We should do this wherever possible.

Totally awesome, indeed!  I'll convert whenever I run
across them -- including in the two files mentioned above.

Thanks for the quick and clear answer!

Pm

Reply via email to