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

Re: svn_client_list, Perl, swig bindings

From: Nik Clayton <nik_at_ngo.org.uk>
Date: 2007-02-26 22:32:08 CET

Nik Clayton wrote;
>> Attached is a diff that's my first cut at doing that. Since
>> svn_client_list() takes a parameter that (in Perl) is a subroutine
>> reference, I've modeled the approach on the svn_client_list()
>> implementation, which does the same thing.

That should, of course, be "modeled the approach on svn_client_log()".

Miller, Eric wrote:
> My swig isn't that great either, but maybe you are missing the baton?
> I know the ctx and pool are derived from the object data members if not
> specified, but I don't know anything about the baton.

I don't think that's it. As far as I can tell, the baton becomes the
pointer to the Perl callback. The normal callback is always the same
(svn_swig_pl_thunk_list_receiver() in this case), and it's the job of that
callback to unpack the Perl subroutine reference from the baton, and call
through it.

This appears to be what the generated swig files are doing, and it matches
what svn_client_log() does. It's always possible that I've misunderstood
something about this process though.

> Personally I have been using ls instead of list, so I haven't run into
> this.

It's ls() and friends that got me in to this. I started looking at exposing
ls2() and ls3(), and the docs for ls3() say it's implemented in terms of
list()...

N

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Feb 26 22:32:54 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.