[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mono-patches
Subject:    [Mono-patches] mono/mono/tests pinvoke2.cs,1.24,1.25 libtest.c,1.69,1.70 ChangeLog,1.73,1.74
From:       zoltan () mono-cvs ! ximian ! com (Zoltan Varga (vargaz AT freemail ! hu))
Date:       2004-09-30 9:45:16
Message-ID: 20040930094516.9455094762 () mono-cvs ! ximian ! com
[Download RAW message or body]

Update of /cvs/public/mono/mono/tests
In directory mono-cvs.ximian.com:/tmp/cvs-serv29947

Modified Files:
	pinvoke2.cs libtest.c ChangeLog 
Log Message:
2004-09-30  Zoltan Varga  <vargaz@freemail.hu>

	* libtest.c pinvoke2.cs: Add test for returning delegates.


Index: pinvoke2.cs
===================================================================
RCS file: /cvs/public/mono/mono/tests/pinvoke2.cs,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- pinvoke2.cs	17 Sep 2004 17:56:09 -0000	1.24
+++ pinvoke2.cs	30 Sep 2004 09:45:14 -0000	1.25
@@ -170,6 +170,9 @@
 	[DllImport ("libtest", EntryPoint="mono_test_marshal_delegate_struct")]
 	public static extern int mono_test_marshal_delegate_struct (DelegateStruct d);
 
+	[DllImport ("libtest", EntryPoint="mono_test_marshal_return_delegate")]
+	public static extern SimpleDelegate mono_test_marshal_return_delegate (SimpleDelegate d);
+
 	[DllImport ("libtest", EntryPoint="mono_test_return_vtype")]
 	public static extern SimpleStruct mono_test_return_vtype (IntPtr i);
 
@@ -390,6 +393,14 @@
 		SimpleDelegate d = new SimpleDelegate (delegate_test);
 
 		return mono_test_marshal_delegate (d);
+	}
+
+	static int test_0_marshal_return_delegate () {
+		SimpleDelegate d = new SimpleDelegate (delegate_test);
+
+		SimpleDelegate d2 = mono_test_marshal_return_delegate (d);
+
+		return d2 (2);
 	}
 
 	static int test_0_marshal_delegate_struct () {

Index: libtest.c
===================================================================
RCS file: /cvs/public/mono/mono/tests/libtest.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- libtest.c	21 Sep 2004 12:56:24 -0000	1.69
+++ libtest.c	30 Sep 2004 09:45:14 -0000	1.70
@@ -500,6 +500,12 @@
 	return delegate (2);
 }
 
+SimpleDelegate
+mono_test_marshal_return_delegate (SimpleDelegate delegate)
+{
+	return delegate;
+}
+
 typedef simplestruct (STDCALL *SimpleDelegate2) (simplestruct ss);
 
 int

Index: ChangeLog
===================================================================
RCS file: /cvs/public/mono/mono/tests/ChangeLog,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- ChangeLog	28 Sep 2004 19:19:11 -0000	1.73
+++ ChangeLog	30 Sep 2004 09:45:14 -0000	1.74
@@ -1,10 +1,14 @@
+2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
+
+	* libtest.c pinvoke2.cs: Add test for returning delegates.
+
 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
 
 	* Makefile.am: Add marshal.cs.
 
 	* marshal.cs: New file for Marshal tests.
 
-2004-09-21    <vargaz@freemail.hu>
+2004-09-21 Zoltan Varga <vargaz@freemail.hu>
 
 	* libtest.c: Free memory using CoTaskMemFree on windows.
 	* libtest.c (mono_test_stdcall_name_mangling): Remove declspec(dllimport).

_______________________________________________
Mono-patches maillist  -  Mono-patches@ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic