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

Re: rfc on structure changes

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-09-28 11:41:06 CEST

On Wed, 28 Sep 2005, Madan U Sreenivasan wrote:

> On Thu, 2005-09-22 at 00:17, Peter N. Lundblad wrote:
> > On Wed, 21 Sep 2005, Madan U Sreenivasan wrote:
> >
> > > This is a request for modifying the way certain publicly available
> > > structures are written. The below is the only example am able to give...
> > > but its possible that there are more like this...
> > >
> > > svn_ra_plugin_t structure in subversion/include/svn_ra.h. I need to
> > > change a parameter of the svn_commit_callback_t member.
> >
> > You don't need to change anything in that struct:-) It is deprecated and
> > not used anymore except for backwards compatibility. The internal
> > svn_ra__vtable_t can be changed at will.
> I'm stuck trying to change svn_ra__vtable_t (at will ;) ). Here, am
> having to change the signature of the get_commit_editor member to use
> svn_commit_callback2_t.
>
> Now, svn_ra_get_commit_editor() will have to be deprecated, and will
> force us to retain usage of svn_commit_callback_t. Now this will force
> us to retain all callbacks(even private) and functions that use them,
> till the repos layer and for all three ra libraries.

Why can't you just create a wrapper callback in the deprecated
svn_ra_get_commit_editor. You create a function with the callback2
signature, and a baton where you save the old-style callback and baton.
Then, in svn_wc_get_commit_editor, you give that callback to
svn_wc_get_commit_editor2. Your callback will call the old-style callback
given to the deprecated function, extracting the fields from the struct. I
haven't lookd in detail, so maybe *I* am missing something.

Best,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 28 11:42:40 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.