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

Re: svn commit: r25517 - in trunk/subversion: include libsvn_client

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-07-06 02:02:41 CEST

On Wed, 27 Jun 2007, Lieven Govaerts wrote:

> Malcolm Rowe wrote:
> > Hi Lieven,
> >
> > On Sat, Jun 23, 2007 at 11:45:34AM -0700, lgo@tigris.org wrote:
> >
> >> Fix backwards compatibility issue with svn_client_status2.
> >>
> >>
> >> --- trunk/subversion/include/svn_types.h (original)
> >> +++ trunk/subversion/include/svn_types.h Sat Jun 23 11:45:34 2007
> >> @@ -300,6 +300,20 @@
> >> #define SVN_DEPTH_FROM_RECURSE(recurse) \
> >> ((recurse) ? svn_depth_infinity : svn_depth_files)
> >>
> >> +
> >> +/* Return an @c svn_depth_t depth based on boolean @a recurse.
> >> + * Use this only for the status command, as it has a unique interpretation
> >> + * of recursion.
> >> + *
> >> + * @note New code should never need to use this, it is called only
> >> + * from pre-depth APIs, for compatibility.
> >> + *
> >> + * @since New in 1.5.
> >> + */
> >> +#define SVN_DEPTH_FROM_RECURSE_STATUS(recurse) \
> >> + ((recurse) ? svn_depth_infinity : svn_depth_immediates)
> >> +
> >> +
> >>
> >
> > It strikes me that a public macro that says "don't use this" isn't
> > particularly useful to other users of the API. Is there any reason not
> > to just inline the definition into the single place it's used?
> >
> Malcolm, thanks for the review.
>
> There is a second place in which this macro should be used, that's in
> svn/main.c 1609. But I forgot to change it, so thx for the reminder! ;)
>
> The reason why I added a second macro is to make it clear to users of
> the SVN_DEPTH_FROM_RECURSE macro that it doesn't give the correct
> results in all cases, more specifically when working with status.
>
> AFAIC, neither of the two need to be in a public interface, are there
> better options?

Sure. Add an include/private/svn_types_private.h header file, and
change the macros to use our double-underscore notation.

http://subversion.tigris.org/hacking.html#other-conventions

  • application/pgp-signature attachment: stored
Received on Fri Jul 6 02:02:33 2007

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.