[sre] Use coop handles for ModuleBuilder.set_wrappers_type
[mono.git] / mono / metadata / sre.c
index e93e716a1dc0a47c8f8c64305976461636bb2474..b50434bc1feca744de19cc559bf63b873dac06d3 100644 (file)
@@ -4365,10 +4365,12 @@ ves_icall_ModuleBuilder_getUSIndex (MonoReflectionModuleBuilderHandle module, Mo
 }
 
 void
-ves_icall_ModuleBuilder_set_wrappers_type (MonoReflectionModuleBuilder *moduleb, MonoReflectionType *type)
+ves_icall_ModuleBuilder_set_wrappers_type (MonoReflectionModuleBuilderHandle moduleb, MonoReflectionTypeHandle ref_type, MonoError *error)
 {
-       MonoDynamicImage *image = moduleb->dynamic_image;
+       error_init (error);
+       MonoDynamicImage *image = MONO_HANDLE_GETVAL (moduleb, dynamic_image);
+       MonoType *type = MONO_HANDLE_GETVAL (ref_type, type);
 
-       g_assert (type->type);
-       image->wrappers_type = mono_class_from_mono_type (type->type);
+       g_assert (type);
+       image->wrappers_type = mono_class_from_mono_type (type);
 }