gboolean found = FALSE;
ic = (MonoClass *)g_ptr_array_index (ifaces, i);
offset = mono_class_interface_offset (method->klass, ic);
- for (j = 0; j < ic->method.count; ++j) {
+ int mcount = mono_class_get_method_count (ic);
+ for (j = 0; j < mcount; ++j) {
if (method->klass->vtable [j + offset] == method) {
found = TRUE;
break;
ic = cominterop_get_method_interface (method);
offset = mono_class_interface_offset (method->klass, ic);
g_assert(offset >= 0);
- for(i = 0; i < ic->method.count; ++i) {
+ int mcount = mono_class_get_method_count (ic);
+ for(i = 0; i < mcount; ++i) {
if (method->klass->vtable [i + offset] == method)
{
slot = ic->methods[i]->slot;
static gboolean cominterop_can_support_dispatch (MonoClass* klass)
{
- if (!(klass->flags & TYPE_ATTRIBUTE_PUBLIC) )
+ if (!mono_class_is_public (klass))
return FALSE;
if (!cominterop_com_visible (klass))
start_slot = 7;
}
else {
- method_count += iface->method.count;
+ method_count += mono_class_get_method_count (iface);
start_slot = cominterop_get_com_slot_begin (iface);
iface = NULL;
}
memcpy (vtable+3, idispatch, sizeof (idispatch));
iface = itf;
- for (i = iface->method.count-1; i >= 0;i--) {
+ for (i = mono_class_get_method_count (iface) - 1; i >= 0; i--) {
int param_index = 0;
MonoMethodBuilder *mb;
MonoMarshalSpec ** mspecs;