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 {
get {
string[] result = new string [2];
result [0] = CallName + " = " + FromNative ("native_" + CallName) + ";";
result [1] = (Generatable as IManualMarshaler).ReleaseNative ("native_" + CallName) + ";";
string[] result = new string [PassAs == string.Empty ? 1 : 2];
int i = 0;
if (PassAs != string.Empty) {
result [i++] = CallName + " = " + FromNative ("native_" + CallName) + ";";
}
result [i++] = (Generatable as IManualMarshaler).ReleaseNative ("native_" + CallName) + ";";
return result;
}
}