Re: [Ikvm-developers] Delegates that take ref parameters
Brought to you by:
jfrijters
From: Michael B. <md...@sa...> - 2012-01-18 18:11:50
|
On Wed, Jan 18, 2012 at 12:58 AM, Jeroen Frijters <je...@su...> wrote: > Maybe I'm missing something, but I think this is only part of what you want. The patch makes the Method inner interface available, but you can't actually use it (because the Invoke method signature doesn't match the delegate Invoke method). I can't say that I know why it's working, but the patch I submitted works. I'm calling delegate methods with ref parameters and they're working. :) Here are the signatures generated by some simple test code I wrote: namespace Test { public delegate void RefDelegate (ref bool foo); } public final class cli.Test.RefDelegate extends cli.System.MulticastDelegate implements cli.System.ICloneable,cli.System.Runtime.Serialization.ISerializable{ public cli.Test.RefDelegate(cli.Test.RefDelegate$Method); public cli.Test.RefDelegate(java.lang.Object, cli.System.IntPtr); public final native void Invoke(boolean[]); public final native cli.System.IAsyncResult BeginInvoke(boolean[], cli.System.AsyncCallback, java.lang.Object); public final native void EndInvoke(boolean[], cli.System.IAsyncResult); } public interface cli.Test.RefDelegate$Method{ public abstract void Invoke(boolean[]); } It looks like the Invoke() method is properly generated with a boolean[] argument. Maybe the type wrapping occurs early enough that everything else just works? -- md...@sa... |