Skip to content

Commit

Permalink
Merge pull request #1385 from Unity-Technologies/unity-2019.4-mbe-fix…
Browse files Browse the repository at this point in the history
…-1293534

Expose mono_class_is_open_constructed_type to Unity to allow us to ch…
  • Loading branch information
dtomar-rythmos authored Jan 8, 2021
2 parents 329b65a + ad128f5 commit 4d5be20
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 11 additions & 2 deletions mono/metadata/unity-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,10 @@ MonoClass* mono_unity_class_get_generic_definition(MonoClass* klass)
MonoClass* mono_unity_class_inflate_generic_class(MonoClass *gklass, MonoGenericContext *context)
{
MonoError error;
return mono_class_inflate_generic_class_checked(gklass, context, &error);
MonoClass* klass;
klass = mono_class_inflate_generic_class_checked(gklass, context, &error);
mono_error_cleanup (&error);
return klass;
}

gboolean mono_unity_class_has_parent_unsafe(MonoClass *klass, MonoClass *parent)
Expand Down Expand Up @@ -1898,4 +1901,10 @@ MONO_API uint32_t
mono_unity_allocation_granularity()
{
return (uint32_t)(2 * sizeof(void *));
}
}

MONO_API gboolean
mono_unity_class_is_open_constructed_type (MonoClass *klass)
{
return mono_class_is_open_constructed_type (&klass->byval_arg);
}
2 changes: 2 additions & 0 deletions mono/metadata/unity-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,6 @@ mono_unity_set_enable_handler_block_guards (mono_bool allow);
mono_bool
mono_unity_get_enable_handler_block_guards (void);

MONO_API gboolean mono_unity_class_is_open_constructed_type (MonoClass *klass);

#endif

0 comments on commit 4d5be20

Please sign in to comment.