Hello,

I saw build errors in the bindings with SWIG 3.0.4:
./subversion/bindings/swig/core.i:792: Error: Unknown SWIG preprocessor
directive: The (if this is a block of target language code, delimit it
with %{ and %})

The attached patch fixes the comment style issue in trunk and 1.8.x.

[[[
Fix build errors in bindings with SWIG 3.0.4

* subversion/bindings/swig/core.i
  (core_set_current_pool): Fix comment style.

* subversion/bindings/swig/include/proxy.swg
  (__getattr__,__setattr__): Same.

* subversion/bindings/swig/svn_delta.i
  (_ops_get): Same.
]]]

With kind regards,
Andreas Stieger
Index: subversion/bindings/swig/core.i
===================================================================
--- subversion/bindings/swig/core.i	(revision 1654697)
+++ subversion/bindings/swig/core.i	(working copy)
@@ -800,10 +800,11 @@ core_set_current_pool (apr_pool_t *pool)
 #endif
 
 #ifdef SWIGPYTHON
-# The auth baton depends on the providers, so we preserve a
-# reference to them inside the wrapper. This way, if all external
-# references to the providers are gone, they will still be alive,
-# keeping the baton valid.
+/* The auth baton depends on the providers, so we preserve a
+ * reference to them inside the wrapper. This way, if all external
+ * references to the providers are gone, they will still be alive,
+ * keeping the baton valid.
+ */
 %feature("pythonappend") svn_auth_open %{
   val.__dict__["_deps"] = list(args[0])
 %}
Index: subversion/bindings/swig/include/proxy.swg
===================================================================
--- subversion/bindings/swig/include/proxy.swg	(revision 1654697)
+++ subversion/bindings/swig/include/proxy.swg	(working copy)
@@ -83,13 +83,14 @@
 
     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
+    /* 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
+    // Verify that the new object is good
     _assert_valid_deep(value)
 
     return value
@@ -98,9 +99,10 @@
     """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
+    /* 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 1654697)
+++ subversion/bindings/swig/svn_delta.i	(working copy)
@@ -206,8 +206,9 @@ 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.
+/* 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

Reply via email to