merlinm / rpms / subversion

Forked from rpms/subversion 4 years ago
Clone
3de0754
3de0754
Fugly hack to fix build with SWIG 3.0.x.  The pre-processor seems to 
3de0754
expand the %define correctly with only the change to %{..%}, but 
3de0754
%extend still breaks somehow.
3de0754
3de0754
https://github.com/swig/swig/issues/379
3de0754
3de0754
--- subversion-1.8.13/subversion/bindings/swig/include/proxy.swg.swigpython
3de0754
+++ subversion-1.8.13/subversion/bindings/swig/include/proxy.swg
3de0754
@@ -62,7 +62,7 @@
3de0754
 
3de0754
 /* Default code for all wrapped proxy classes in Python */
3de0754
 %define %proxy_pythoncode(TYPE)
3de0754
-%pythoncode {
3de0754
+%pythoncode %{
3de0754
   def set_parent_pool(self, parent_pool=None):
3de0754
     """Create a new proxy object for TYPE"""
3de0754
     import libsvn.core, weakref
3de0754
@@ -83,13 +83,10 @@
3de0754
 
3de0754
     value = _swig_getattr(self, self.__class__, name)
3de0754
 
3de0754
-    # If we got back a different object than we have, we need to copy all our
3de0754
-    # metadata into it, so that it looks identical
3de0754
     members = self.__dict__.get("_members")
3de0754
     if members is not None:
3de0754
       _copy_metadata_deep(value, members.get(name))
3de0754
         
3de0754
-    # Verify that the new object is good
3de0754
     _assert_valid_deep(value)
3de0754
 
3de0754
     return value
3de0754
@@ -98,13 +95,10 @@
3de0754
     """Set an attribute on this object"""
3de0754
     self.assert_valid()
3de0754
 
3de0754
-    # Save a copy of the object, so that the garbage
3de0754
-    # collector won't kill the object while it's in
3de0754
-    # SWIG-land
3de0754
     self.__dict__.setdefault("_members",{})[name] = value
3de0754
 
3de0754
     return _swig_setattr(self, self.__class__, name, value)
3de0754
-}
3de0754
+%}
3de0754
 %enddef
3de0754
 
3de0754
 /* Define a proxy for wrapping an existing struct */