summaryrefslogtreecommitdiff
path: root/src/vm/weakreferencenative.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/weakreferencenative.h')
-rw-r--r--src/vm/weakreferencenative.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/vm/weakreferencenative.h b/src/vm/weakreferencenative.h
new file mode 100644
index 0000000000..0d946f9855
--- /dev/null
+++ b/src/vm/weakreferencenative.h
@@ -0,0 +1,42 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+/*============================================================
+**
+** Header: WeakReferenceNative.h
+**
+**
+===========================================================*/
+
+#ifndef _WEAKREFERENCENATIVE_H
+#define _WEAKREFERENCENATIVE_H
+
+//
+// The implementations of WeakReferenceNative and WeakReferenceOfTNative are identical, but the managed signatures
+// are different. WeakReferenceOfTNative has strongly typed signatures. It is necessary for correct security transparancy
+// annotations without compromising inlining (security critical code cannot be inlined into security neutral code).
+//
+
+class WeakReferenceNative
+{
+public:
+ static FCDECL3(void, Create, WeakReferenceObject * pThis, Object * pTarget, CLR_BOOL trackResurrection);
+ static FCDECL1(void, Finalize, WeakReferenceObject * pThis);
+ static FCDECL1(Object *, GetTarget, WeakReferenceObject * pThis);
+ static FCDECL2(void, SetTarget, WeakReferenceObject * pThis, Object * pTarget);
+ static FCDECL1(FC_BOOL_RET, IsTrackResurrection, WeakReferenceObject * pThis);
+ static FCDECL1(FC_BOOL_RET, IsAlive, WeakReferenceObject * pThis);
+};
+
+class WeakReferenceOfTNative
+{
+public:
+ static FCDECL3(void, Create, WeakReferenceObject * pThis, Object * pTarget, CLR_BOOL trackResurrection);
+ static FCDECL1(void, Finalize, WeakReferenceObject * pThis);
+ static FCDECL1(Object *, GetTarget, WeakReferenceObject * pThis);
+ static FCDECL2(void, SetTarget, WeakReferenceObject * pThis, Object * pTarget);
+ static FCDECL1(FC_BOOL_RET, IsTrackResurrection, WeakReferenceObject * pThis);
+};
+
+#endif // _WEAKREFERENCENATIVE_H