Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by [EMAIL PROTECTED]

http://bugzilla.ximian.com/show_bug.cgi?id=79312

--- shadow/79312        2006-09-07 14:31:57.000000000 -0400
+++ shadow/79312.tmp.17688      2006-09-07 16:05:31.000000000 -0400
@@ -1,13 +1,13 @@
 Bug#: 79312
 Product: Mono: Runtime
 Version: 1.1
 OS: unknown
 OS Details: Mac OSX 10.4.7, G4
-Status: NEW   
-Resolution: 
+Status: RESOLVED   
+Resolution: NOTABUG
 Severity: Unknown
 Priority: Normal
 Component: interop
 AssignedTo: [EMAIL PROTECTED]                            
 ReportedBy: [EMAIL PROTECTED]               
 QAContact: [EMAIL PROTECTED]
@@ -130,6 +130,49 @@
 (e.g. EnumRef), but that is tied to a given word size, so it's not
 32/64 bit friendly.
 
 Thanks for looking at this!
 Jim
 
+
+------- Additional Comments From [EMAIL PROTECTED]  2006-09-07 16:05 -------
+Jim, this is not Mono's problem. You're overlooking something:
+
+In C, a function which returns a struct has another calling
+convention than one which returns a pointer to a struct.
+
+If I translate your C# code to C your're trying to
+do this:
+
+typedef struct {
+} foo;
+
+foo function ()
+{
+    foo f;
+    return f;
+}
+
+foo *foo_ptr = (foo *) function ();
+
+This is totally wrong.
+
+
+Since you can't declare "aliases" in C#, you have to live
+with IntPtrs. If you really don't like it, you might write
+wrappers:
+
+public struct EventLoopRef
+{
+   public IntPtr h;
+}
+
+public static EventLoopRef GetCurrentEventLoop ()
+{
+    EventLoopRef result;
+    result.h = GetCurrentEventLoop();
+}
+
+[DllImport(LIB)]
+static extern IntPtr GetCurrentEventLoop();
+
+
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to