Fix ownership of out function parameters

This fixes Novell bug #498498.
This commit is contained in:
Sebastian Dröge 2009-06-03 20:47:37 +02:00
parent 0efb6ed587
commit 7a57660044

View file

@ -281,7 +281,10 @@ namespace GtkSharp.Generation {
result [i] = (gen as IManualMarshaler).ReleaseNative ("native_" + CallName) + ";"; result [i] = (gen as IManualMarshaler).ReleaseNative ("native_" + CallName) + ";";
return result; return result;
} else if (PassAs != String.Empty && MarshalType != CSType) } else if (PassAs != String.Empty && MarshalType != CSType)
return new string [] { CallName + " = " + gen.FromNative ("native_" + CallName) + ";" }; if (gen is HandleBase)
return new string [] { CallName + " = " + (gen as HandleBase).FromNative ("native_" + CallName, Owned) + ";" };
else
return new string [] { CallName + " = " + gen.FromNative ("native_" + CallName) + ";" };
return new string [0]; return new string [0];
} }
} }