Re: [Mono-list] Embedded API: thunk value type parameters and return types

2016-09-23 Thread Jonathan Mitchell
> On 23 Sep 2016, at 15:04, Jonathan Mitchell wrote: > > Based on that I would say that a “complex” value thunk type has a slightly > wider scope: > > (type.IsValueType && !(type.IsPrimitive || type.IsEnum || type.IsPointer ) == > true > Oops - pointers are not value types. (type.IsValueTyp

Re: [Mono-list] Embedded API: thunk value type parameters and return types

2016-09-23 Thread Jonathan Mitchell
HI Robert > On 23 Sep 2016, at 12:17, Robert Jordan wrote: >> > > The limitation only applies to "complex" value types: > > (type.IsValueType && !type.IsPrimitive) == true > Thanks for that. I did a bit more work on getting my unit tests to pass https://github.com/ThesaurusSoftware/Dubrovnik/

Re: [Mono-list] Embedded API: thunk value type parameters and return types

2016-09-23 Thread Robert Jordan
Hi Jonathan, On 22.09.2016 22:22, Jonathan Mitchell wrote: I am trying to upgrade some method invoke based code to used thunks. The comments for mono_method_get_unmanaged_thunk() say: * LIMITATIONS * * Value type arguments and return values are treated as they were objects: * * C#: public

[Mono-list] Embedded API: thunk value type parameters and return types

2016-09-22 Thread Jonathan Mitchell
I am trying to upgrade some method invoke based code to used thunks. The comments for mono_method_get_unmanaged_thunk() say: * LIMITATIONS * * Value type arguments and return values are treated as they were objects: * * C#: public static Rectangle Intersect (Rectangle a, Rectangle b); * C: