[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn_fs__parse_skel prototype question

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-12-03 22:14:29 CET

On Tue, Dec 03, 2002 at 02:10:01PM -0500, Greg Hudson wrote:
> On Tue, 2002-12-03 at 13:23, Philip Martin wrote:
> > I don't understand the comment about not using 'const char*' for DATA.
> > If svn_fs__parse_skel is not going to change DATA then 'const char*'
> > is exactly what is wanted, and making it const in no way constrains
> > the callers.
>
> The created skel will point into DATA, not a copy of it. Data pointed
> to by skels can be modified. (I don't know if we ever do modify data
> pointed to by skels, and I'd say our lives would be safer if skels were
> immutable, but that's not how things are right now.)

I agree, and wanted to do this change a long while ago. I think that at one
point, I *did* change skel->data to be constant, but Jim backed it out.

Whatever the case, yes: we should change skel->data to be 'const char *' and
then ripple the change outwards. Note that there are a lot of casts to
'char *' throughout the code to satisfy functions that take char*, but we
only have const data. [those casts will need to go away]

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 3 22:12:59 2002

This is an archived mail posted to the Subversion Dev mailing list.