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

Re: CVS update: subversion/subversion/libsvn_fs txn-table.c

From: Greg Stein <gstein_at_lyra.org>
Date: 2000-12-14 20:44:36 CET

On Thu, Dec 14, 2000 at 10:46:52AM -0500, Jim Blandy wrote:
>
> > Actually, isn't this a facet of all calls to svn_fs__*_to_dbt()? That you're
> > feeding data to the DBT for insertion, and that nothing will attempt to
> > change the DBT after that point?
> >
> > IOW, why wouldn't this cast move inside of str_to_dbt and a "const" applied
> > to the str_to_dbt prototype?
>
> BTW, I don't think it's helpful to apply to `const' to `skel_t'
> arguments. A skel is a tree, not a single node or array of nodes. So
> a `const skel_t *' argument doesn't mean "I won't modify this tree",
> which is what one really wants to say; it means "I won't modify the
> top skel of this tree, but I might munge any of the other skels it
> points to," which is useless.

1) It is still important as it conveys a semantic. Sure, the typing rules
   allow you to change the contents. This is similar to applying a const
   marker to an svn_string_t. But we *do* know the intent when we see the
   const.

2) I'd like to see the child skel points as const. This would definitely
   toss out the "well, I might modify the thing you pass me" aspect. I'm not
   sure how feasible this will be, but plan to take a look at the problem
   when the FS code begins to settle.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:17 2006

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.