[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: Brandon Ehle <azverkan_at_yahoo.com>
Date: 2002-12-03 15:39:20 CET

Greg Stein wrote:

>On Mon, Dec 02, 2002 at 03:59:29PM -0800, Peter Davis wrote:
>
>
>>On Monday 02 December 2002 15:37, Philip Martin wrote:
>>
>>
>>>> adm_baton = wc.svn_wc_adm_open(None, None, dir, True, True, adm_pool)
>>>>
>>>>
>>>I know nothing about swig. The C function svn_wc_adm_open returns an
>>>error (an svn_error_t*) not an access baton (an svn_wc_adm_access_t*).
>>>The access baton is returned through the first argument, which is of
>>>type svn_wc_adm_access_t**. If passing "None" above is equivalent to
>>>passing NULL in C then that will cause a segv.
>>>
>>>
>>I don't know much about Swig either, but I do know that it is capable of
>>defining and translating arguments (the first argument in this case), as
>>return values. If an error is returned by the real svn_wc_adm_open, then
>>Swig will throw a real Python exception. Otherwise, it actually returns the
>>value of the implicit first argument. The first "None" above should actually
>>be the second argument passed to the real svn_wc_adm_open, if I understand
>>Swig correctly.
>>
>>
>
>Right. Except that we didn't tell swig that "svn_wc_adm_access_t **" was a
>return value. I just fixed that, so it should work much better now. In fact,
>I updated the geturl.py to match the new APIs.
>
>
>
At one time, swig (version 1.1) used to generate documentation files
that documented the API that it exports. Is this functionality still
available?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 3 15:47:57 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.