On Thu, Sep 20, 2001 at 04:25:45PM -0400, Dan Sugalski wrote:
> At 01:06 PM 9/20/2001 -0700, Robert Spier wrote:
> >   Could you explain again why you don't want char* anywhere, and prefer 
> > void*?
> 
> Because for character data we're not sure char * is right. (Might be 
> wchar_t, __int16, __int32, or something else) It's also to shake off the 
> "Oh, it's character data! I can use the <string.h> functions!" reaction.

"char" is misnamed in C--it should have been called "byte".  If you
have a string of bytes, which you intend to treat as a string of
bytes, then you should use a char* for it.  (Well, unsigned char*.)

The question is whether any given chunk of data is going to be treated
as a string of bytes or not.  I'm certain that there will be such data
strings somewhere in Parrot; I'm not certain if the type of string
which gets put into an SV will be of this type or not.

                     - Damien

Reply via email to