Skip to content

Commit 65af3e7

Browse files
committed
[unitytls] mono_unity_get_unitytls_interface is now called via icall
1 parent 52e347b commit 65af3e7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

mcs/class/System/Mono.UnityTls/UnityTls.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ public class mono_unity_unitytls_interface
230230
public unitytls_tlsctx_free_t unitytls_tlsctx_free;
231231
}
232232

233-
[DllImport("__Internal")]
234-
private static extern IntPtr mono_unity_get_unitytls_interface();
233+
[MethodImplAttribute (MethodImplOptions.InternalCall)]
234+
private static extern IntPtr GetUnityTlsInterface ();
235235

236236
private static mono_unity_unitytls_interface marshalledInterface = null;
237237

@@ -242,7 +242,7 @@ public static mono_unity_unitytls_interface NativeInterface
242242
get
243243
{
244244
if (marshalledInterface == null) {
245-
IntPtr rawInterface = mono_unity_get_unitytls_interface ();
245+
IntPtr rawInterface = GetUnityTlsInterface ();
246246
if (rawInterface == IntPtr.Zero)
247247
return null;
248248
marshalledInterface = Marshal.PtrToStructure<mono_unity_unitytls_interface> (rawInterface);

mono/metadata/icall-def.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ ICALL(KPAIR_4, "_ProtectMachine", ves_icall_Mono_Security_Cryptography_KeyPairPe
114114
ICALL(KPAIR_5, "_ProtectUser", ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectUser)
115115
#endif /* !PLATFORM_RO_FS */
116116

117+
ICALL_TYPE(UNITYTLS, "Mono.Unity.UnityTls", UNITYTLS_1)
118+
ICALL(UNITYTLS_1, "GetUnityTlsInterface", mono_unity_get_unitytls_interface)
119+
117120
ICALL_TYPE(APPDOM, "System.AppDomain", APPDOM_23)
118121
HANDLES(ICALL(APPDOM_23, "DoUnhandledException", ves_icall_System_AppDomain_DoUnhandledException))
119122
HANDLES(ICALL(APPDOM_1, "ExecuteAssembly", ves_icall_System_AppDomain_ExecuteAssembly))

0 commit comments

Comments
 (0)