File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 30
30
#include <mono/metadata/tokentype.h>
31
31
#include <mono/utils/mono-string.h>
32
32
33
+ #if HAVE_BDWGC_GC
34
+ #include <external/bdwgc/include/gc.h>
35
+ #endif
36
+
33
37
#include <glib.h>
34
38
35
39
#ifdef WIN32
@@ -900,6 +904,35 @@ mono_unity_get_unitytls_interface()
900
904
return gUnitytlsInterface ;
901
905
}
902
906
907
+ // gc
908
+ MONO_API void mono_unity_gc_enable ()
909
+ {
910
+ #if HAVE_BDWGC_GC
911
+ GC_enable ();
912
+ #else
913
+ g_assert_not_reached ();
914
+ #endif
915
+ }
916
+
917
+ MONO_API void mono_unity_gc_disable ()
918
+ {
919
+ #if HAVE_BDWGC_GC
920
+ GC_disable ();
921
+ #else
922
+ g_assert_not_reached ();
923
+ #endif
924
+ }
925
+
926
+ MONO_API int mono_unity_gc_is_disabled ()
927
+ {
928
+ #if HAVE_BDWGC_GC
929
+ return GC_is_disabled ();
930
+ #else
931
+ g_assert_not_reached ();
932
+ return 0 ;
933
+ #endif
934
+ }
935
+
903
936
MONO_API void
904
937
mono_unity_install_unitytls_interface (unitytls_interface_struct * callbacks )
905
938
{
Original file line number Diff line number Diff line change @@ -150,6 +150,11 @@ typedef struct unitytls_interface_struct unitytls_interface_struct;
150
150
MONO_API unitytls_interface_struct * mono_unity_get_unitytls_interface ();
151
151
MONO_API void mono_unity_install_unitytls_interface (unitytls_interface_struct * callbacks );
152
152
153
+ // gc
154
+ MONO_API void mono_unity_gc_enable ();
155
+ MONO_API void mono_unity_gc_disable ();
156
+ MONO_API int mono_unity_gc_is_disabled ();
157
+
153
158
//misc
154
159
MonoAssembly * mono_unity_assembly_get_mscorlib ();
155
160
MonoImage * mono_unity_image_get_mscorlib ();
You can’t perform that action at this time.
0 commit comments