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

Re: svn commit: rev 1851 - trunk/subversion/include trunk/subversion/libsvn_fs trunk/subversion/tests/libsvn_fs

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-05-14 19:56:32 CEST

On Tue, May 14, 2002 at 10:21:40AM -0500, cmpilato@collab.net wrote:
> Greg Stein <gstein@lyra.org> writes:
> > > + svn_fs_id_t *id_copy = svn_fs__id_copy (root_id, trail->pool);
> >
> > It wasn't immediately obvious why the ID was copied. I just realized it is
> > to get the ID from whereever the caller had it into the trail pool. A
> > comment might be nice.
> Actually, once I removed this copy I was reminded by the compiler why
> I added it in the first place. It was a const -> non-const
> assignment. I guess I was afraid of using a cast. :-)

Ah. Then my next response would be, "drop the cast. constify the structure

I don't see us changing the *contents* of the ID in the structure. We might
point the structure to a new ID, but it would be strange to modify it in
place. Thus, the const ought to work fine.


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 May 14 19:55:41 2002

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.