From cb3cb710f65e43d06104ec0a96a2f04e38856725 Mon Sep 17 00:00:00 2001 From: Jay Krell Date: Tue, 8 Oct 2019 21:54:44 -0700 Subject: [PATCH] Revert mono_runtime_set_main_args in mono/mono@44ff0597b835d0af62f526169dba3b365c9c3411. (mono/mono#17233) It breaks Xamarin.Android. Commit migrated from https://github.com/mono/mono/commit/cacf99b97314870585af79e78191b836f9e072b5 --- src/mono/mono/metadata/object.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mono/mono/metadata/object.c b/src/mono/mono/metadata/object.c index 758531f..05b9fc7 100644 --- a/src/mono/mono/metadata/object.c +++ b/src/mono/mono/metadata/object.c @@ -4542,8 +4542,6 @@ free_main_args (void) int mono_runtime_set_main_args (int argc, char* argv[]) { - MONO_ENTER_GC_UNSAFE; - MONO_REQ_GC_NEUTRAL_MODE; int i; @@ -4565,9 +4563,7 @@ mono_runtime_set_main_args (int argc, char* argv[]) main_args [i] = utf8_arg; } - MONO_EXIT_GC_UNSAFE; - - return 0; + MONO_EXTERNAL_ONLY (int, 0); } /* -- 2.7.4