* generator/Method.cs: marked Is and Has methods,

to be generated as properties, fixes bug [47910]

svn path=/trunk/gtk-sharp/; revision=19468
This commit is contained in:
Martin Willemoes Hansen 2003-10-29 22:11:59 +00:00
parent 0a6f618d58
commit d5a4cdb689
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2003-10-29 Martin Willemoes Hansen <mwh@sysrq.dk>
* generator/Method.cs: marked Is and Has methods,
to be generated as properties, fixes bug [47910]
2003-10-28 Mike Kestner <mkestner@ximian.com>
* configure.in : releasing 0.12

View file

@ -168,7 +168,7 @@ namespace GtkSharp.Generation {
else
safety = "";
is_get = (((parms != null && ((parms.IsAccessor && s_ret == "void") || (parms.Count == 0 && s_ret != "void"))) || (parms == null && s_ret != "void")) && Name.Length > 3 && Name.Substring(0, 3) == "Get");
is_get = (((parms != null && ((parms.IsAccessor && s_ret == "void") || (parms.Count == 0 && s_ret != "void"))) || (parms == null && s_ret != "void")) && Name.Length > 3 && (Name.StartsWith ("Get") || Name.StartsWith ("Is") || Name.StartsWith ("Has")));
is_set = ((parms != null && (parms.IsAccessor || (parms.Count == 1 && s_ret == "void"))) && (Name.Length > 3 && Name.Substring(0, 3) == "Set"));
if (parms != null) {
@ -233,7 +233,10 @@ namespace GtkSharp.Generation {
s_ret = parms.AccessorReturnType;
sw.Write(s_ret);
sw.Write(" ");
sw.Write(Name.Substring (3));
if (Name.StartsWith ("Get") || Name.StartsWith ("Set"))
sw.Write (Name.Substring (3));
else
sw.Write (Name);
sw.WriteLine(" { ");
} else {
sw.Write(s_ret + " " + Name + sig);