Hi,
In <20050916210345.GC16738@despot.finemaltcoding.com>
"Re: swig changes for svn_txdelta_apply" on Fri, 16 Sep 2005 14:03:45 -0700,
"Daniel L. Rall" <dlr@finemaltcoding.com> wrote:
> On Sat, 17 Sep 2005, Kouhei Sutou wrote:
> ...
> > In <20050916134315.GC74254@home.clkao.org>
> > "swig changes for svn_txdelta_apply" on Fri, 16 Sep 2005 21:43:15 +0800,
> > Chia-liang Kao <clkao@clkao.org> wrote:
> ...
> > > I am wondering if there's any way we can cope with the incompatibility
> > > more gracefully, as I actually want the fixed behaviour as well, but
> > > don't want to break existing code horribly.
> ...
> > I'll attach a patch that recover existing Perl bindings
> > svn_txdelta_apply API. If you don't agree with my approach,
> > could do you apply this patch?
> ...
> > --- subversion/bindings/swig/include/svn_types.swg ($B%j%S%8%g%s(B 16142)
> > +++ subversion/bindings/swig/include/svn_types.swg ($B:n6H%3%T!<(B)
> > @@ -499,8 +499,10 @@
> > svn_txdelta_apply() uses *result_digest not digest[] .
> > */
> > %apply unsigned char digest[ANY] {
> > - unsigned char *digest,
> > - unsigned char *result_digest
> > +#ifdef SWIGRUBY
> > + unsigned char *result_digest,
> > +#endif
> > + unsigned char *digest
> > };
>
> This patch will fix the immediate problem with the Perl API incompatibility.
> However, clkao raises a good question as to how to bring the Perl bindings
> in line with this API in the long term, yet not break API compatibility in
> the short term.
The following pseudo Ruby (sorry, I can't write Perl...)
code shows my suggested approach:
module Svn
module Delta
alias original_apply apply
def apply(source, target, dummy_argument, error_info)
result_digest, handler, handler_baton =
original_apply(source, target, error_info)
return [handler, handler_baton, result_digest]
end
end
end
Could you understand my suggested approach?
Thanks,
--
kou
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Sep 18 11:50:39 2005