From 69e25c0bdd5b775aee77104bb5729607a3553ebc Mon Sep 17 00:00:00 2001 From: Ben Maurer Date: Mon, 15 Mar 2004 04:24:17 +0000 Subject: [PATCH] structs svn path=/trunk/mcs/; revision=24039 --- mcs/tools/monop/ChangeLog | 4 ++++ mcs/tools/monop/TODO | 1 - mcs/tools/monop/monop.cs | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mcs/tools/monop/ChangeLog b/mcs/tools/monop/ChangeLog index 083885064a6..f22549fc1a8 100644 --- a/mcs/tools/monop/ChangeLog +++ b/mcs/tools/monop/ChangeLog @@ -1,3 +1,7 @@ +2004-03-14 Ben Maurer + + * monop.cs: do structs better. + 2004-03-14 Ben Maurer * monop.cs: add gtk#. Try catch if gtk# is not installed. diff --git a/mcs/tools/monop/TODO b/mcs/tools/monop/TODO index 3786426eec2..72973d76331 100644 --- a/mcs/tools/monop/TODO +++ b/mcs/tools/monop/TODO @@ -11,6 +11,5 @@ TODO * handle explicit vs. implicit impl * Show virtual/override? * Fields - * Show valuetypes as `struct' * Do enums * Do delegates \ No newline at end of file diff --git a/mcs/tools/monop/monop.cs b/mcs/tools/monop/monop.cs index 408d065a89d..1f1ce6f4464 100644 --- a/mcs/tools/monop/monop.cs +++ b/mcs/tools/monop/monop.cs @@ -86,16 +86,16 @@ class MonoP { static void PrintClass (Type t) { - o.Write ("public class {0}", t.Name); + o.Write ("public {0} {1}", t.IsValueType ? "struct" : "class", t.Name); Type [] interfaces = (Type []) Comparer.Sort (t.GetInterfaces ()); Type parent = t.BaseType; - if ((parent != null && parent != typeof (object))|| interfaces.Length != 0) { + if ((parent != null && parent != typeof (object) && parent != typeof (ValueType))|| interfaces.Length != 0) { bool first = true; o.Write (" : "); - if (parent != null && parent != typeof (object)) { + if (parent != null && parent != typeof (object) && parent != typeof (ValueType)) { o.Write (PName (parent)); first = false; } -- 2.25.1