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