Skip to content

Commit 45a309f

Browse files
authored
Merge pull request #1438 from Unity-Technologies/mono-unity-field-from-token
Adding mono_unity_field_from_token to public API
2 parents a22bb98 + 39c9720 commit 45a309f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

mono/metadata/unity-utils.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,11 @@ void* mono_unity_get_field_address(MonoObject *obj, MonoVTable *vt, MonoClassFie
11021102
return src;
11031103
}
11041104

1105+
MONO_API MonoClassField* mono_unity_field_from_token_checked(MonoImage *image, guint32 token, MonoClass **retklass, MonoGenericContext *context, MonoError *error)
1106+
{
1107+
return mono_field_from_token_checked(image, token, retklass, context, error);
1108+
}
1109+
11051110
gboolean mono_unity_thread_state_init_from_handle(MonoThreadUnwindState *tctx, MonoThreadInfo *info, void* fixme)
11061111
{
11071112
tctx->valid = TRUE;

mono/metadata/unity-utils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ MonoException* mono_unity_thread_check_exception();
184184
MonoObject* mono_unity_delegate_get_target(MonoDelegate *delegate);
185185
gchar* mono_unity_get_runtime_build_info(const char *date, const char *time);
186186
void* mono_unity_get_field_address(MonoObject *obj, MonoVTable *vt, MonoClassField *field);
187+
MONO_API MonoClassField* mono_unity_field_from_token_checked(MonoImage *image, guint32 token, MonoClass **retklass, MonoGenericContext *context, MonoError *error);
187188
gboolean mono_unity_thread_state_init_from_handle(MonoThreadUnwindState *tctx, MonoThreadInfo *info, void* fixme);
188189
void mono_unity_stackframe_set_method(MonoStackFrame *sf, MonoMethod *method);
189190
MonoType* mono_unity_reflection_type_get_type(MonoReflectionType *type);

0 commit comments

Comments
 (0)