* pinvoke2.cs (test_0_calli_dynamic): Use the cdecl version
of mono_test_marshal_inout_array. Fixes the test when compiled
with MSC (and GCC where it worked by accident).
* libtest.c (mono_test_marshal_inout_array_cdecl):
New. cdecl wrapper for the function with the same name.
svn path=/trunk/mono/; revision=158175
+2010-05-31 Robert Jordan <robertj@gmx.net>
+
+ * pinvoke2.cs (test_0_calli_dynamic): Use the cdecl version
+ of mono_test_marshal_inout_array. Fixes the test when compiled
+ with MSC (and GCC where it worked by accident).
+
+ * libtest.c (mono_test_marshal_inout_array_cdecl):
+ New. cdecl wrapper for the function with the same name.
+
2010-05-31 Robert Jordan <robertj@gmx.net>
* libtest.c (mono_test_marshal_lookup_symbol): Export as STDCALL because
return sum;
}
+LIBTEST_API int /* cdecl */
+mono_test_marshal_inout_array_cdecl (int *a1)
+{
+ return mono_test_marshal_inout_array (a1);
+}
+
LIBTEST_API int STDCALL
mono_test_marshal_out_array (int *a1)
{
delegate void CalliDel (IntPtr a, int[] f);
public static int test_0_calli_dynamic () {
- IntPtr func = mono_test_marshal_lookup_symbol ("mono_test_marshal_inout_array");
+ /* we need the cdecl version because the icall convention demands it under Windows */
+ IntPtr func = mono_test_marshal_lookup_symbol ("mono_test_marshal_inout_array_cdecl");
DynamicMethod dm = new DynamicMethod ("calli", typeof (void), new Type [] { typeof (IntPtr), typeof (int[]) });