Magellan Linux

Annotation of /trunk/subversion/patches/subversion-1.8.13-swigpython.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2562 - (hide annotations) (download)
Wed Apr 22 07:43:58 2015 UTC (9 years ago) by niro
File size: 1469 byte(s)
-fix build issues with swig3
1 niro 2562
2     Fugly hack to fix build with SWIG 3.0.x. The pre-processor seems to
3     expand the %define correctly with only the change to %{..%}, but
4     %extend still breaks somehow.
5    
6     https://github.com/swig/swig/issues/379
7    
8     --- subversion-1.8.13/subversion/bindings/swig/include/proxy.swg.swigpython
9     +++ subversion-1.8.13/subversion/bindings/swig/include/proxy.swg
10     @@ -62,7 +62,7 @@
11    
12     /* Default code for all wrapped proxy classes in Python */
13     %define %proxy_pythoncode(TYPE)
14     -%pythoncode {
15     +%pythoncode %{
16     def set_parent_pool(self, parent_pool=None):
17     """Create a new proxy object for TYPE"""
18     import libsvn.core, weakref
19     @@ -83,13 +83,10 @@
20    
21     value = _swig_getattr(self, self.__class__, name)
22    
23     - # If we got back a different object than we have, we need to copy all our
24     - # metadata into it, so that it looks identical
25     members = self.__dict__.get("_members")
26     if members is not None:
27     _copy_metadata_deep(value, members.get(name))
28    
29     - # Verify that the new object is good
30     _assert_valid_deep(value)
31    
32     return value
33     @@ -98,13 +95,10 @@
34     """Set an attribute on this object"""
35     self.assert_valid()
36    
37     - # Save a copy of the object, so that the garbage
38     - # collector won't kill the object while it's in
39     - # SWIG-land
40     self.__dict__.setdefault("_members",{})[name] = value
41    
42     return _swig_setattr(self, self.__class__, name, value)
43     -}
44     +%}
45     %enddef
46    
47     /* Define a proxy for wrapping an existing struct */