Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-704.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a45295e052b3d6e727df6677a4f06a10b86e3bf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Compiler options: -unsafe

using System;
using System.Runtime.InteropServices;

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

		[DllImport ("libc.dylib")]
		public extern static void printf (string format, __arglist);

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

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

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