Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
2 changes: 1 addition & 1 deletion mono/metadata/icall-def.h
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ ICALL_TYPE(MEVIN, "System.Reflection.MonoEventInfo", MEVIN_1)
HANDLES(ICALL(MEVIN_1, "get_event_info", ves_icall_MonoEventInfo_get_event_info))

ICALL_TYPE(MFIELD, "System.Reflection.MonoField", MFIELD_1)
ICALL(MFIELD_1, "GetFieldOffset", ves_icall_MonoField_GetFieldOffset)
HANDLES(ICALL(MFIELD_1, "GetFieldOffset", ves_icall_MonoField_GetFieldOffset))
HANDLES(ICALL(MFIELD_2, "GetParentType", ves_icall_MonoField_GetParentType))
ICALL(MFIELD_5, "GetRawConstantValue", ves_icall_MonoField_GetRawConstantValue)
ICALL(MFIELD_3, "GetValueInternal", ves_icall_MonoField_GetValueInternal)
Expand Down
8 changes: 4 additions & 4 deletions mono/metadata/icall.c
Original file line number Diff line number Diff line change
Expand Up @@ -1933,12 +1933,12 @@ ves_icall_System_MonoMethodInfo_get_retval_marshal (MonoMethod *method, MonoErro
}

ICALL_EXPORT gint32
ves_icall_MonoField_GetFieldOffset (MonoReflectionField *field)
ves_icall_MonoField_GetFieldOffset (MonoReflectionFieldHandle field, MonoError *error)
{
MonoClass *parent = field->field->parent;
mono_class_setup_fields (parent);
MonoClassField *class_field = MONO_HANDLE_GETVAL (field, field);
mono_class_setup_fields (class_field->parent);

return field->field->offset - sizeof (MonoObject);
return class_field->offset - sizeof (MonoObject);
}

ICALL_EXPORT MonoReflectionTypeHandle
Expand Down