subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Shahaf <>
Subject Re: How to call SVN's fs.change_rev_prop2 from Python / SWIG - passing old_value_p as a double pointer?
Date Wed, 02 Sep 2015 15:35:04 GMT
[ Summary for dev@: calling svn_fs_change_rev_prop() from Python works;
calling svn_fs_change_rev_prop2() with old_value_p=None changes the
property and then segfaults. ]

Mark Ziesemer wrote on Wed, Sep 02, 2015 at 00:01:40 +0000:
> I'm trying to call fs.change_rev_prop2 ( from Python /
> SWIG - and apparently can't figure out how to pass old_value_p as what I'm
> assuming needs to be a double pointer from Python.

In short, I don't think that's currently possible; I think the bindings
will need to be patched for this to work.  The 'const svn_string_t
*const *old_value_p' parameter of svn_fs_change_rev_prop2() will need to
be wrapped correctly.  (Currently it is wrapped incorrectly: passing
None to it segfaults although NULL is a valid value.)

How should that parameter be presented to Python code?  In particular,
how should Python code that passes a "pointer to a NULL pointer" as the
argument look like?

(Moving the thread to dev@.  I'll reply separately on users@ with a few
notes about your code.)



View raw message