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

Re: How to call SVN's fs.change_rev_prop2 from Python / SWIG - passing old_value_p as a double pointer?

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Wed, 2 Sep 2015 15:35:04 +0000

[ 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 (https://goo.gl/6b6TG5) 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.)

Cheers,

Daniel
Received on 2015-09-02 17:35:20 CEST

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.