[Test]
public unsafe void GetSetValuePointers ()
{
+ Pointer p0 = (Pointer)typeof (FieldInfoTest).GetField ("ip").GetValue (null);
+ int *p0i = (int*)Pointer.Unbox (p0);
+ Assert.AreEqual (IntPtr.Zero, new IntPtr (p0i));
+
int i = 5;
void *p = &i;
typeof (FieldInfoTest).GetField ("ip").SetValue (null, (IntPtr)p);
}
/* MONO_TYPE_PTR is passed by value to runtime_invoke () */
- args [0] = *ptr;
+ args [0] = ptr ? *ptr : NULL;
args [1] = mono_type_get_object (mono_domain_get (), type);
return mono_runtime_invoke (m, NULL, args, NULL);