You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Hyrum K. Wright" <hy...@mail.utexas.edu> on 2007/06/22 16:24:16 UTC

Move some of svn_types.h into svn_interfaces.h

Hi all,

I've been trying to determine a way to consolidate the duplicate types
of svn_repos_file_rev_handler_t and svn_ra_file_rev_handler_t types into
the same definition.  Much like svn_log_message_receiver2_t, the file
rev handlers are used by multiple libraries to pass data between them,
and have identical definitions.

My first attempt was to define svn_file_rev_handler_t in svn_types.h and
implement the library specific versions as typedefs.  That didn't work
due to circular dependency issues with svn_delta.h and the

So, here's my next attempt: creating a new header file,
svn_interfaces.h, and putting the definition of svn_file_rev_handler_t
in it.  I've also moved svn_log_message_receiver2_t, and the prototype
for its compatibility wrapper to the new header file, and updated callers.

Are there any objections to this approach, or suggestions for a better
one?  Also, what are the backward compatibility implications of moving
other interface definitions in svn_types.h to svn_interfaces.h?

-Hyrum


Re: Move some of svn_types.h into svn_interfaces.h

Posted by David Glasser <gl...@mit.edu>.
On 6/23/07, Hyrum K. Wright <hy...@mail.utexas.edu> wrote:
> svn_log_message_receiver2_t was introduced as part of 1.5.  As such, it
> isn't yet part of the public API, and we don't have to maintain any
> backward compat with it.  We should be able to put it wherever we please
> at this point.  (After we release 1.5, it's stuck.)

Oh, good point.

If you do do this, though, do make sure that the deprecation clause
for svn_log_message_receiver_t in svn_types.h makes it stunningly
clear where the new version is.

--dave

-- 
David Glasser | glasser@mit.edu | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Move some of svn_types.h into svn_interfaces.h

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Glasser wrote:
> On 6/22/07, Hyrum K. Wright <hy...@mail.utexas.edu> wrote:
>> Are there any objections to this approach, or suggestions for a better
>> one?  Also, what are the backward compatibility implications of moving
>> other interface definitions in svn_types.h to svn_interfaces.h?
> 
> Unless svn_types.h includes svn_interfaces.h, you probably can't move
> svn_log_message_receiver2_t from the former to the latter, since that
> would break code that just has "#include <svn_types.h>" and tries to
> use svn_log_message_receiver2_t.

svn_interfaces.h includes svn_types.h, not the other way around.  We'd
start running into circular dependencies if we did it the other way, and
that's the problem that prompted this idea.

svn_log_message_receiver2_t was introduced as part of 1.5.  As such, it
isn't yet part of the public API, and we don't have to maintain any
backward compat with it.  We should be able to put it wherever we please
at this point.  (After we release 1.5, it's stuck.)

However, your point does how for interface definitions which are
currently in svn_types.h

- -Hyrum
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGfZpwCwOubk4kUXwRAvKRAKDH2B9yH9Rs99neWmkXGGHg+DFxcgCfZepP
wmd5D04BohYcYA4iJxzSjbc=
=dGSv
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Move some of svn_types.h into svn_interfaces.h

Posted by David Glasser <gl...@mit.edu>.
On 6/22/07, Hyrum K. Wright <hy...@mail.utexas.edu> wrote:
> Are there any objections to this approach, or suggestions for a better
> one?  Also, what are the backward compatibility implications of moving
> other interface definitions in svn_types.h to svn_interfaces.h?

Unless svn_types.h includes svn_interfaces.h, you probably can't move
svn_log_message_receiver2_t from the former to the latter, since that
would break code that just has "#include <svn_types.h>" and tries to
use svn_log_message_receiver2_t.

--dave

-- 
David Glasser | glasser@mit.edu | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org