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

Re: r1619122 (stsp) broke 'make swig-py'

From: Ben Reser <ben_at_reser.org>
Date: Thu, 21 Aug 2014 11:01:42 +0100

On 8/21/14 9:39 AM, Ben Reser wrote:
> I have the "correct" fix but in so much as it makes things compile. But I
> don't know that it makes the svn_wc_conflict_description2_t setters do anything
> useful. Writing a test now, so I should have it fixed shortly.

I think this is the right fix for the memberin typmap for svn_string_t but
wrapping the svn_wc_conflict_resolver_func2_t is more bother than I'm willing
to go to to find out if this is correct (I know it compiles, but don't know if
you can actually use the struct). The patch should make it so it'll work with
the syntax of:
struct.string = foo
  and
struct.string_set(foo)
  and
struct.string_set(foo, pool)

[[[
Index: include/svn_string.swg
===================================================================
--- include/svn_string.swg (revision 1619137)
+++ include/svn_string.swg (working copy)
@@ -210,6 +210,16 @@
    svn_string_t structure on the heap. */
 #ifdef SWIGPYTHON
 %typemap(memberin) const svn_string_t * {
+ apr_pool_t *_global_pool = NULL;
+ PyObject *_global_py_pool = NULL;
+
+ if (_global_pool == NULL)
+ {
+ if (svn_swig_py_get_parent_pool(args, $descriptor(apr_pool_t *),
+ &_global_py_pool, &_global_pool))
+ SWIG_fail;
+ }
+
     $1 = svn_string_dup($input, _global_pool);
 }
 #endif
]]]

So while posting the above to preserve for posterity. I'm just going to remove
the memberin typemap for svn_string_t and apply Alexey's patch.
Received on 2014-08-21 12:02:26 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.