Embedded API: unsafe int * query

Jonathan Mitchell <[email protected]>
Newsgroups gmane.comp.gnome.mono.devel
Message-ID <[email protected]>
On MacOS I have updated my Obj-C - Mono bridge from using a custom built 64 bit version of Mono 4.0 to the current fat binary Mono 4.8
My unit tests are happy with one exception.

Consider:

c# 
Class RefObject {
public IntPtr Pointer { get; set; }
public unsafe int * Int32Pointer { get; set; }
}

Obj-C Test
    [refObject setInt32Pointer:&theInt];
    int32_t *int32Pointer = [refObject int32Pointer];
    XCTAssertTrue(int32Pointer == &theInt, DBUEqualityTestFailed);
    XCTAssertTrue(*int32Pointer == theInt, DBUEqualityTestFailed);

On Mono 4.0 I could pass pointers via the embedded API without issue.
On 4.8 (and perhaps earlier) the public unsafe int * Int32Pointer test always fails.
public IntPtr Pointer { get; set; } works fine in all cases.

Was the embedded API marshalling of unsafe pointers changed relatively recently?
I am not sure quite where to look in the source for this one.

Jonathan


_______________________________________________
Mono-devel-list mailing list
[email protected]
http://lists.dot.net/mailman/listinfo/mono-devel-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.