Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose mono_class_is_open_constructed_type to Unity to allow us to ch… #1385

Merged
merged 1 commit into from
Jan 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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