From 64ff72c07f724c734e67c220625613aa92a24e17 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Tue, 27 May 2008 17:04:06 +0000 Subject: [PATCH] 2008-05-27 Mike Kestner * generator/Method.cs (GenerateBody): when generating value type methods, we should demarshal the 'this' memory before any ref or out parameters in the event that someone passes 'this' as a param. That will ensure that an updated value coming back from the native side ends up in the memory location. svn path=/trunk/gtk-sharp/; revision=104166 --- ChangeLog | 8 ++++++++ generator/Method.cs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bb337f681..f7628af4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-05-27 Mike Kestner + + * generator/Method.cs (GenerateBody): when generating value type + methods, we should demarshal the 'this' memory before any ref or + out parameters in the event that someone passes 'this' as a param. + That will ensure that an updated value coming back from the native + side ends up in the memory location. + 2008-05-22 Mike Kestner * gtk/Widget.custom: guard against MissingIntPtrCtorException in diff --git a/generator/Method.cs b/generator/Method.cs index b5832f7af..b234a96bd 100644 --- a/generator/Method.cs +++ b/generator/Method.cs @@ -285,9 +285,9 @@ namespace GtkSharp.Generation { sw.WriteLine(indent + "\t\t\t" + retval.CSType + " ret = " + retval.FromNative ("raw_ret") + ";"); } - Body.Finish (sw, indent); if (!IsStatic && implementor != null) implementor.Finish (sw, indent + "\t\t\t"); + Body.Finish (sw, indent); Body.HandleException (sw, indent); if (is_get && Parameters.Count > 0)