summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-09-23 07:10:36 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-09-23 07:10:36 +0200
commitfc4c56bfa351b867fe59d306322925bf1bd73900 (patch)
treed0e91aaa3d9f59b9714a3acf46ed86a0ce7fa842
parent102f895fb61f5d797f82aebb81ad0430fc6eb5eb (diff)
Add support for specifying other default values for return values
This allows us the override the base.SomeVMethod return values in case the native type doesn't implement the VM.
-rw-r--r--generator/ReturnValue.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/generator/ReturnValue.cs b/generator/ReturnValue.cs
index 784cd23..c27178f 100644
--- a/generator/ReturnValue.cs
+++ b/generator/ReturnValue.cs
@@ -43,6 +43,7 @@ namespace GtkSharp.Generation {
owned = elem.GetAttribute ("owned") == "true";
ctype = elem.GetAttribute("type");
element_ctype = elem.GetAttribute ("element_type");
+ default_value = elem.GetAttribute ("default_value");
}
}
@@ -64,8 +65,11 @@ namespace GtkSharp.Generation {
}
}
+ private string default_value = null;
public string DefaultValue {
get {
+ if (default_value != null && default_value != String.Empty)
+ return default_value;
if (IGen == null)
return String.Empty;
return IGen.DefaultValue;