From 0563af1c25b359107cb0ddb481f4a5e8d25f573d Mon Sep 17 00:00:00 2001 From: Stephan Sundermann Date: Tue, 18 Mar 2014 02:16:05 +0100 Subject: [PATCH] generator: Fix handle being passed when type is a struct A static getter method would always generate a Handle parameter even though some types do not have a Handle, for example structs. Closes issue #99. Signed-off-by: Bertrand Lorentz --- generator/Method.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/Method.cs b/generator/Method.cs index 08c0537ce..80ae73c6d 100644 --- a/generator/Method.cs +++ b/generator/Method.cs @@ -243,7 +243,7 @@ namespace GtkSharp.Generation { return; else { is_set = false; - call = "(Handle, " + Body.GetCallString (false) + ")"; + call = "(" + (IsStatic ? "" : container_type.CallByName () + (parms.Count > 0 ? ", " : "")) + Body.GetCallString (false) + ")"; comp = null; } }