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

Re: Problem with python swig example - geturl.py

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-12-03 04:01:13 CET

On Mon, Dec 02, 2002 at 10:42:48PM +0000, Jon Middleton wrote:
> I'm having some problems with updating geturl.py to the lastest swig
> bindings. When the following line is run the script segv's
>
> adm_baton = wc.svn_wc_adm_open(None, None, dir, True, True, adm_pool)
>
> Can anyone shed any light on what I'm doing wrong ? I've also attached
> the script.

The SWIG bindings did not recognize that the "svn_wc_adm_access_t **" was a
return value. I just tweaked svn_wc.i to tell it that. Thus, the call
becomes:

  adm_baton = wc.svn_wc_adm_open(associated, path,
                                 write_lock, tree_lock, pool)

>...
> def run(file):
>
> util.apr_initialize()
> pool = util.svn_pool_create(None)

It is much easier to use svn.util.run_app() for this basic stuff. Also note
that the original usage for geturl.py provided for multiple arguments, but
your change drops that to a single file.

In any case, I've updated tools/examples/geturl.py to work with the new WC
APIs. Go ahead and take a look.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 3 03:59:27 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.