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

Re: svn_repos.h: Typo in definition of svn_repos_parser_fns2_t?

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-07-25 23:27:18 CEST

David James <james82@gmail.com> writes:

> In svn_repos.h, we declare a struct using the name
> "svn_repos_parse_fns2_t", and then we typedef it using the
> slightly-different name svn_repos_parser_fns2_t. This same
> inconsistency also applies to svn_repos_parser_fns_t. Is this a typo?
> If so, I can think of two ways to fix it:
> 1. Fix the typo. Only use the name "parser" to describe the structure,
> not "parse", since "parser" is the canonical name.
> 2. Declare the struct as "parser", but then include a deprecated
> typedef for compatibility.
>
> Which solution do you think is better?

I don't think you do either as Subversion's API compatibility
guidelines mean that the old names must continue to "work". Adding a
typedef is not really enough--third party code could still break, e.g.

   struct svn_repos_parse_fns2_t f;

will not compile if svn_repos_parse_fns2_t is only a typedef and not a
struct.

> P.S. This inconsistency causes problems in the SWIG bindings, because
> SWIG thinks that the name of the struct is svn_repos_parse_fns2_t,
> even though the struct is not typedef'd under that name.

The API guidelines allow you to add to the existing names:

typedef svn_repos_parser_fns2_t svn_repos_parse_fns2_t;

if that helps.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jul 25 23:29:50 2005

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.