diff --git a/runtime/delegates.t4 b/runtime/delegates.t4 index d681c77238..46033fdd96 100644 --- a/runtime/delegates.t4 +++ b/runtime/delegates.t4 @@ -83,7 +83,7 @@ }, new XDelegate ("void", "void", "xamarin_register_entry_assembly", - "MonoReflectionAssembly *", "IntPtr", "assembly" + "GCHandle->MonoReflectionAssembly *", "IntPtr", "assembly" ) { WrappedManagedFunction = "RegisterEntryAssembly", OnlyDynamicUsage = true, diff --git a/src/ObjCRuntime/Runtime.cs b/src/ObjCRuntime/Runtime.cs index 32d2e26956..41dcd70d9e 100644 --- a/src/ObjCRuntime/Runtime.cs +++ b/src/ObjCRuntime/Runtime.cs @@ -402,7 +402,7 @@ namespace ObjCRuntime { static void RegisterEntryAssembly (IntPtr a) { - RegisterEntryAssembly ((Assembly) ObjectWrapper.Convert (a)); + RegisterEntryAssembly ((Assembly) GetGCHandleTarget (a)); } static void ThrowNSException (IntPtr ns_exception)