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

Re: Multiple problems with svn python bindings

From: Jon Trowbridge <trow_at_ximian.com>
Date: 2002-08-31 08:36:56 CEST

On Fri, 2002-08-30 at 16:42, Greg Stein wrote:
> The issue here is that we need to accept a (Python) list and construct an
> apr_array_header_t for passing into those functins. To do *that*, we need a
> pool for that construction. So what needs to happen with those functions is
> to somehow tell SWIG that the pool to use is "arg6" or whatever.

Is there a way to get SWIG to do this that isn't totally abusive? I
figured out one way, but it is so overwhelmingly hacky that I'm too
embarrassed to mention it in public. :)

> I'm not yet sure what the cleanest approach would be for this. Hardcode it
> for each function that takes an array? Is there some other approach?

Hardcoding it seems like the simplest approach. It is only three
functions, after all.

And speaking of svn_client_diff, is there a way to construct something
in python that maps to an apr_file_t? Or do we also need to put that on
the to-do list?

> But for each and every callback, we need some "thunk" types of layers...

Yeah, it looks like thunks should be pretty doable using a
multiple-argument typemap.

I can at least help out with the trivial bits. Attached are two (very
small) patches: the first one fixes the crash in the svn_client_proplist
wrapper, and the second allows the xml_src and xml_dst arguments to be
None.

Thanks,
-JT

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

Received on Sat Aug 31 08:38:36 2002

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.