[Mono-list] Embedded API: static constructor calling
robertj at gmx.net
Tue Oct 1 14:35:22 UTC 2013
On 01.10.2013 15:16, jonathan at mugginsoft.com wrote:
> On 1 Oct 2013, at 14:01, Robert Jordan <robertj at gmx.net> wrote:
>> mono_field_get_value_object is not mono_field_STATIC_get!
>> You are looking at the wrong function.
> Sorry. I was trying to imply that, as in mono_field_get_value_object, that mono_field_static_get_value should do its own vtable setup.
> This looks like a bug.
I don't think this is a bug. mono_field_static_get/set and
mono_field_get/set behave pretty much the same: Both require
that the ctor was already invoked. The former requires
mono_runtime_class_init () whereas the latter needs
mono_runtime_object_init () or an explicit non-default ctor
mono_field_get_value_object () is somewhat different because it
deals with both static and instance fields. It's more elaborated
(and slower), and serves different purposes (maybe it's used by
System.Reflection, I did't check).
More information about the Mono-list