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

Re: Of SWIG Python bindings and batons provided via void** arguments

From: Charles Duffy <cduffy_at_spamcop.net>
Date: 2007-02-23 06:27:24 CET

David James wrote:
> For a more complete example, see the test_do_diff2 test, which I just
> added to
> http://svn.collab.net/repos/svn/trunk/subversion/bindings/swig/python/tests/ra.py

Thank you -- that helps a great deal.

What I don't see it doing, however, is filling out the callback
structure. In particular, I'm a little unclear on how open_tmp_file is
supposed to be populated; running without it results in a segfault when
svn tries to dereference the pointer, and trying to assign a Python
method fails as follows:

   File "./propcache.py", line 263, in _transform_to_revision
     callbacks.open_tmp_file = open_tmp_file
   File "/usr/lib64/python2.4/site-packages/libsvn/ra.py", line 240, in
__setattr__
     return _swig_setattr(self, self.__class__, name, value)
   File "/usr/lib64/python2.4/site-packages/libsvn/ra.py", line 22, in
_swig_setattr
     return _swig_setattr_nondynamic(self,class_type,name,value,0)
   File "/usr/lib64/python2.4/site-packages/libsvn/ra.py", line 15, in
_swig_setattr_nondynamic
     if method: return method(self,value)
TypeError: argument number 2: a 'svn_error_t *(*)(apr_file_t **,void
*,apr_pool_t *)' is expected, 'function(<function open_tmp_file at
0x2addf7f4ccf8>)' is received

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 23 06:28:48 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.