[Mono-bugs] [Bug 472845] Need proper support for __arglist keyword in compiler and P/Invoke

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Feb 5 09:06:16 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=472845

User eugeny.grishul at gmail.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=472845#c2





--- Comment #2 from Eugeny Grishul <eugeny.grishul at gmail.com>  2009-02-05 07:06:15 MST ---
For segfault try to use such code:
//========================================
using System;

namespace NObjective
{
    public class Program
    {
        static volatile bool ProcessExiting = false;

        private static void TestArglistMethod()
        {
            ArglistMethod( __arglist( 1, 2, 3 ) );
        }

        private static void ArglistMethod(__arglist )
        {
            var iter = new ArgIterator( __arglist );

            for( var n = iter.GetRemainingCount(); n > 0; n-- )
                Console.WriteLine( TypedReference.ToObject( iter.GetNextArg() )
);
        }

        static unsafe void Main( string[] args )
        {
            ArglistMethod( __arglist( 1, 2, 3 ) );
        }
    }
}

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list