strings and constness

Erik Hovland erik at hovland.org
Sun Jun 18 17:24:35 UTC 2006


On Sun, Jun 18, 2006 at 12:24:16PM -0400, Rob Landley wrote:
> On Saturday 17 June 2006 9:07 pm, Erik Hovland wrote:
> > On Sat, Jun 17, 2006 at 07:58:00PM -0400, Rob Landley wrote:
> > > On Tuesday 13 June 2006 11:19 pm, Erik Hovland wrote:
> > > > > >See my post and patch to utils.c and utils.h where I did this for
> > > > > >another function:
> > > > > >http://busybox.net/lists/busybox/2006-June/022287.html
> > > > >
> > > > > I see that now, I thought it was a typo since my compiler threw a
> > > > > warning about it.  If there are valid space savings for it, we need
> > > > > to find a way to suppress the warning.
> > > >
> > > > If you want to make the string const, put the const before the *.
> > >
> > > Also, when we have to typecast our way around this crap (as in
> > > skip_whitespace() in libbb where half the users typecast the return value
> > > back to a normal char * when they use it, but it _is_ a normal char * to
> > > begin with...)
> > >
> > > I'm not a fan of const.  Really.
> >
> > I think that the compiler could care a flip about whether you are a
> > fanatic of const.
> 
> The words "fan" and "fanatic" have diverged rather a lot in the last century.  
> And "terrific" no longer means "inspiring terror".  "Spectacular" is still 
> related to drawing spectators, but has other connotations as well.
> 
> Just FYI.

Mr. Landley, you are incredibly pugnacious. It makes for humorous
reading.

E

-- 
Erik Hovland
mail: erik at hovland.org
web: http://hovland.org/
PGP/GPG public key available on request



More information about the busybox mailing list