Hello Gilles Filippini,

Thanks for your thorough investigations.

On Fri, Feb 03, 2017 at 12:19:26AM +0100, Gilles Filippini wrote:
[...]
> > This is caused by gtk-sharp2 2.12.40 generating this line in file 
> > ListenerServer.cs:
> >                 static void _gtype = new void 
> > (indicate_listener_server_get_type(listener == null ? IntPtr.Zero : 
> > listener.Handle, server == null ? IntPtr.Zero : server.Handle, 
> > cb_wrapper.NativeDelegate, IntPtr.Zero));
> > 
> > This line doesn't appear when building against the previous gtk-sharp2 
> > release from snapshot.d.o (2.12.10). According to [1] it works with 
> > gtk-sharp2 2.12.29 as well. A bisect between releases 2.12.29 and 2.12.40 
> > of gtk-sharp2 might give something.
[...]

I have no idea what I'm doing here, but attached is my naive attempt.
The solution looked obvious enough based on all your previous input.

Could you please test if this solves the issue with libindicate for you?

Regards,
Andreas Henriksson
diff -Nru gtk-sharp2-2.12.40/debian/changelog 
gtk-sharp2-2.12.40/debian/changelog
--- gtk-sharp2-2.12.40/debian/changelog 2016-11-15 14:04:31.000000000 +0100
+++ gtk-sharp2-2.12.40/debian/changelog 2017-03-27 22:19:06.000000000 +0200
@@ -1,3 +1,10 @@
+gtk-sharp2 (2.12.40-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add debian/patches/no-void-cachetype.patch (Closes: #849932)
+
+ -- Andreas Henriksson <[email protected]>  Mon, 27 Mar 2017 22:19:06 +0200
+
 gtk-sharp2 (2.12.40-1) unstable; urgency=medium
 
   * The "from Hong Kong's hackerspace DimSumLabs with love" release
diff -Nru gtk-sharp2-2.12.40/debian/patches/no-void-cachetype.patch 
gtk-sharp2-2.12.40/debian/patches/no-void-cachetype.patch
--- gtk-sharp2-2.12.40/debian/patches/no-void-cachetype.patch   1970-01-01 
01:00:00.000000000 +0100
+++ gtk-sharp2-2.12.40/debian/patches/no-void-cachetype.patch   2017-03-27 
22:19:06.000000000 +0200
@@ -0,0 +1,24 @@
+Don't generate return variable for void types
+
+Closes: #849932
+
+--- a/generator/Method.cs
++++ b/generator/Method.cs
+@@ -54,7 +54,7 @@
+ 
+                       if (Name == "GetType") {
+                               Name = "GetGType";
+-                              cacheValue = !(container_type is StructBase);
++                              cacheValue = !(container_type is StructBase) && 
!retval.IsVoid;
+                               cacheName = "_gtype";
+                       }
+               }
+@@ -220,7 +220,7 @@
+               public void GenerateCacheValue (StreamWriter sw)
+               {
+                       if (!cacheValue)
+-                              return;
++                              return;
+                       sw.WriteLine ("\t\tstatic {0} {1} = new {0} ({2});", 
retval.CSType, cacheName, CName + call);
+               }
+ 
diff -Nru gtk-sharp2-2.12.40/debian/patches/series 
gtk-sharp2-2.12.40/debian/patches/series
--- gtk-sharp2-2.12.40/debian/patches/series    2016-11-15 14:04:31.000000000 
+0100
+++ gtk-sharp2-2.12.40/debian/patches/series    2017-03-27 22:07:20.000000000 
+0200
@@ -1,3 +1,4 @@
 01_dllmaps
 02_pcfiles
 03_missing_gtk-sharp_dllmap_entry
+no-void-cachetype.patch

Reply via email to