Skip to content

Commit

Permalink
Merge pull request #1314 from Unity-Technologies/unity-master-fix-125…
Browse files Browse the repository at this point in the history
…5935

Exposing functions: mono_custom_attrs_construct_by_type and mono_unit…
  • Loading branch information
UnityAlex authored Jul 8, 2020
2 parents c867676 + 43fcc88 commit 018fee6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mono/metadata/custom-attrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ create_custom_attr_data (MonoImage *image, MonoCustomAttrEntry *cattr, MonoError
HANDLE_FUNCTION_RETURN_OBJ (obj);
}

static MonoArray*
MonoArray*
mono_custom_attrs_construct_by_type (MonoCustomAttrInfo *cinfo, MonoClass *attr_klass, MonoError *error)
{
MonoArray *result;
Expand Down
1 change: 1 addition & 0 deletions mono/metadata/reflection.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ MONO_RT_EXTERNAL_ONLY
MONO_API MonoCustomAttrInfo* mono_reflection_get_custom_attrs_info (MonoObject *obj);
MONO_RT_EXTERNAL_ONLY
MONO_API MonoArray* mono_custom_attrs_construct (MonoCustomAttrInfo *cinfo);
MONO_API MonoArray* mono_custom_attrs_construct_by_type (MonoCustomAttrInfo *cinfo, MonoClass *attr_klass, MonoError *error);
MONO_RT_EXTERNAL_ONLY
MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_index (MonoImage *image, uint32_t idx);
MONO_RT_EXTERNAL_ONLY
Expand Down
5 changes: 5 additions & 0 deletions mono/metadata/unity-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,11 @@ MonoException* mono_unity_exception_get_marshal_directive(const char* msg)
return mono_exception_from_name_msg(mono_get_corlib(), "System.Runtime.InteropServices", "MarshalDirectiveException", msg);
}

MonoException* mono_unity_error_convert_to_exception (MonoError *error)
{
return mono_error_convert_to_exception (error);
}

//defaults

MonoClass* mono_unity_defaults_get_int_class()
Expand Down
1 change: 1 addition & 0 deletions mono/metadata/unity-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ MonoObject* mono_unity_exception_get_inner_exception(MonoException *exc);
MonoArray* mono_unity_exception_get_trace_ips(MonoException *exc);
void mono_unity_exception_set_trace_ips(MonoException *exc, MonoArray *ips);
MonoException* mono_unity_exception_get_marshal_directive(const char* msg);
MONO_API MonoException* mono_unity_error_convert_to_exception(MonoError *error);

//defaults
MonoClass* mono_unity_defaults_get_int_class();
Expand Down

0 comments on commit 018fee6

Please sign in to comment.