Skip to content

Commit 7f5ddea

Browse files
committed
Add mono_unity_gc_is_disabled
1 parent 467627f commit 7f5ddea

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

mono/metadata/unity-utils.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,16 @@ MONO_API void mono_unity_gc_disable()
923923
#endif
924924
}
925925

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+
926936
MONO_API void
927937
mono_unity_install_unitytls_interface(unitytls_interface_struct* callbacks)
928938
{

mono/metadata/unity-utils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ MONO_API void mono_unity_install_unitytls_interface(unitytls_interface_struct* c
153153
// gc
154154
MONO_API void mono_unity_gc_enable();
155155
MONO_API void mono_unity_gc_disable();
156+
MONO_API int mono_unity_gc_is_disabled();
156157

157158
//misc
158159
MonoAssembly* mono_unity_assembly_get_mscorlib();

0 commit comments

Comments
 (0)