Refactor managed array unboxing to handle case of C# array passes as object

#1415
This commit is contained in:
Wojtek Figat
2023-09-20 14:17:11 +02:00
parent 5c5c64cf76
commit 8bd6649510
6 changed files with 33 additions and 2 deletions

View File

@@ -804,6 +804,11 @@ void* MCore::Array::GetAddress(const MArray* obj)
return mono_array_addr_with_size((MonoArray*)obj, 0, 0);
}
MArray* MCore::Array::Unbox(MObject* obj)
{
return (MArray*)obj;
}
MGCHandle MCore::GCHandle::New(MObject* obj, bool pinned)
{
return mono_gchandle_new(obj, pinned);