Re: [svn:parrot] r19231 - trunk/languages/perl6/src/pmc On Fri, 22 Jun 2007 11:36:28 -0500
"Patrick R. Michaud"  wrote:
> > Also, using sizeof() will fix some cases that strlen() doesn't
> > handle correctly, specifically, strings containing explicit null
> > characters. src/objects.c has a few examples of that.
> > string_to_cstring(interp, "\\0", 0) will get the size wrong, but
> > string_to_cstring_literal(interp, "\\0") will get it right.  So I
> > don't really see a good excuse for not using it everywhere.
> 
> I think you mean "string_from_cstring_literal", not 
> "string_to_cstring_literal".  At least I _hope_ that's 
> what you mean.  :-)

Oops, you're absolutely right.


> Also, out of curiosity, do we really need "cstring" in the name?
> How about simply...?
> 
>     string_from_literal(interp, "Foo")
> 
> (I'm not opposed to leaving 'cstring' in the name if it's important
> to somehow make it clear that the literal is a cstring literal, I'm
> just asking the question.)

I just did it to make it look visually similar to
string_from_cstring().  I am open to suggestions and happy to make
changes.

Mark

