Merge from upstream

This commit is contained in:
Mikkel Kruse Johnsen 2016-07-25 14:39:39 +02:00
parent 9758c7ab8a
commit f861aeb27b

View file

@ -408,9 +408,12 @@ namespace GtkSharp.Generation {
public override string[] Finish { public override string[] Finish {
get { get {
string[] result = new string [2]; string[] result = new string [PassAs == string.Empty ? 1 : 2];
result [0] = CallName + " = " + FromNative ("native_" + CallName) + ";"; int i = 0;
result [1] = (Generatable as IManualMarshaler).ReleaseNative ("native_" + CallName) + ";"; if (PassAs != string.Empty) {
result [i++] = CallName + " = " + FromNative ("native_" + CallName) + ";";
}
result [i++] = (Generatable as IManualMarshaler).ReleaseNative ("native_" + CallName) + ";";
return result; return result;
} }
} }