dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]another bug in pnet


From: Adam Treat
Subject: Re: [DotGNU]another bug in pnet
Date: Sat, 11 Jan 2003 06:56:31 -0500
User-agent: KMail/1.4.7

On Saturday 11 January 2003 07:48 am, Paolo Molaro wrote:
> This specific issue is logged here:
> http://bugzilla.ximian.com/show_bug.cgi?id=36373
> Basically mono throws an exception when it attempts to use
> QNull defined in Qt.dll.
> I first thought it was a bug in mono, but it turns out it's a bug in
> pnet. QNull is a valuetype and as such it needs to have a size > 0.
> I'm sure this is in the spec somewhere, I'm too lazy to look it up, but
> think about it: a valuetype is allocated on the stack, or as a field,
> it _needs_ to have a non-zero size.
> The sample program is something like:
>
> using System;
>
> struct QNull {
>         public override string ToString () {
>                 return "Qnull";
>         }
>         static void Main () {
>                 QNull qn = new QNull ();
>                 Console.WriteLine ("got '{0}'", qn);
>         }
> };

namespace Qt {

        using Qt;
        using System;

        internal struct QNull {

                private static readonly QNull instance = new QNull (null);

                private QNull (Object dummy) {}

                internal static QNull Instance {
                        get {return instance;}
                }
        }
}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]