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

Re: [PATCH] Fix build errors in bindings with SWIG 3.0.4

From: Andreas Stieger <andreas.stieger_at_gmx.de>
Date: Thu, 29 Jan 2015 15:15:55 +0100

On 28/01/15 15:09, Philip Martin wrote:
> Andreas Stieger <andreas.stieger_at_gmx.de> writes:
>
>> I will look into that. The odd thing is when I remove the comments,
>> check-swig-py trips over a svn_pool_create() call without arguments in
>> proxy_apr.swg which looks wrong.
>
> That's python code, not C. The function is defined earlier in the file
> and forwards to _core.svn_pool_create. What error do you get?

When removing comments which throw SWIG 3.0.4 errors as this:

$ svn diff --cl swig -x-p
Index: subversion/bindings/swig/include/proxy.swg
===================================================================
--- subversion/bindings/swig/include/proxy.swg (revision 1655671)
+++ subversion/bindings/swig/include/proxy.swg (working copy)
@@ -83,13 +83,10 @@

     value = _swig_getattr(self, self.__class__, name)

- # If we got back a different object than we have, we need to copy
all our
- # metadata into it, so that it looks identical
     members = self.__dict__.get("_members")
     if members is not None:
       _copy_metadata_deep(value, members.get(name))

- # Verify that the new object is good
     _assert_valid_deep(value)

     return value
@@ -98,9 +95,6 @@
     """Set an attribute on this object"""
     self.assert_valid()

- # Save a copy of the object, so that the garbage
- # collector won't kill the object while it's in
- # SWIG-land
     self.__dict__.setdefault("_members",{})[name] = value

     return _swig_setattr(self, self.__class__, name, value)
Index: subversion/bindings/swig/svn_delta.i
===================================================================
--- subversion/bindings/swig/svn_delta.i (revision 1655671)
+++ subversion/bindings/swig/svn_delta.i (working copy)
@@ -206,8 +206,6 @@ void _ops_get(int *num_ops, const svn_txdelta_op_t

 #ifdef SWIGPYTHON
 %pythoncode {
-# This function is for backwards compatibility only.
-# Use svn_txdelta_window_t.ops instead.
 svn_txdelta_window_t_ops_get = svn_txdelta_window_t._ops_get
 }
 #endif

I get the following error:

> $ nice make -j2 swig-py && nice make -j2 check-swig-py
> if [ "LD_LIBRARY_PATH" = "DYLD_LIBRARY_PATH" ]; then for d in ~/subversion/subversion/bindings/swig/python/libsvn_swig_py ~/subversion/subversion/bindings/swig/python/../../../libsvn_*; do if [ -n "$DYLD_LIBRARY_PATH" ]; then LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$d/.libs"; else LD_LIBRARY_PATH="$d/.libs"; fi; done; export LD_LIBRARY_PATH; fi; \
> cd ~/subversion/subversion/bindings/swig/python; \
> /usr/bin/python ~/subversion/subversion/bindings/swig/python/tests/run_all.py
> Traceback (most recent call last):
> File "~/subversion/subversion/bindings/swig/python/tests/run_all.py", line 22, in <module>
> import mergeinfo, core, client, delta, checksum, pool, ra, wc, repository, \
> File "~/subversion/subversion/bindings/swig/python/tests/mergeinfo.py", line 22, in <module>
> from svn import core, repos, fs
> File "~/subversion/subversion/bindings/swig/python/svn/core.py", line 26, in <module>
> from libsvn.core import *
> File "~/subversion/subversion/bindings/swig/python/libsvn/core.py", line 6386, in <module>
> svn_pool_create()
> TypeError: svn_pool_create() takes exactly 2 arguments (0 given)
> make: *** [check-swig-py] Error 1

Andreas
Received on 2015-01-29 15:16:25 CET

This is an archived mail posted to the Subversion Dev mailing list.