[Mono-dev] [PATCH] Managed Marshal.Copy implemantations

Kornél Pál kornelpal at gmail.com
Thu Mar 20 09:50:01 EDT 2008


Hi,

> From: "Paolo Molaro" <lupus at ximian.com>
> There are two issues.
> First that is related to a different change that the rest of the patch:
> it's better to do things incrementally instead of conflating multiple
> things into the same changeset.
> Second, GetElementSize () is not the right interface for use inside
> Buffer. Buffer only applies for a subset of the arrays (basic types and
> maybe valuetypes of basic types only, I didn't check all the allowed
> cases). So you'd need at least another icall that says if the Copy
> operations are allowed on the array. It's better to have a single icall
> that does it all, returning 0 for the cases where the copy is not
> allowed. In that case the name GetElementSize would be wrong.

OK, I see the problem. Would it be reasonable to expose internal runtime 
structures to managed code so that it could read internal array properties 
rather than relying on internal calls?

Kornél 



More information about the Mono-devel-list mailing list