if (method->signature)
mono_metadata_free_inflated_signature (method->signature);
+ if (method->wrapper_type)
+ g_free (((MonoMethodWrapper*)method)->method_data);
+
g_free (method);
}
free_generic_class (MonoGenericClass *gclass)
{
/* The gclass itself is allocated from the image set mempool */
- if (gclass->is_dynamic)
- mono_reflection_free_dynamic_generic_class (gclass);
if (gclass->cached_class && gclass->cached_class->interface_id)
mono_unload_interface_id (gclass->cached_class);
}
return gclass;
}
- if (is_dynamic) {
- MonoDynamicGenericClass *dgclass = mono_image_set_new0 (set, MonoDynamicGenericClass, 1);
- gclass = &dgclass->generic_class;
+ gclass = mono_image_set_new0 (set, MonoGenericClass, 1);
+ if (is_dynamic)
gclass->is_dynamic = 1;
- } else {
- gclass = mono_image_set_new0 (set, MonoGenericClass, 1);
- }
gclass->is_tb_open = is_tb_open;
gclass->container_class = container_class;
guid[10], guid[11], guid[12], guid[13], guid[14], guid[15]);
}
+/**
+ * mono_guid_to_string_minimal:
+ *
+ * Converts a 16 byte Microsoft GUID to lower case no '-' representation..
+ */
+char *
+mono_guid_to_string_minimal (const guint8 *guid)
+{
+ return g_strdup_printf ("%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+ guid[3], guid[2], guid[1], guid[0],
+ guid[5], guid[4],
+ guid[7], guid[6],
+ guid[8], guid[9],
+ guid[10], guid[11], guid[12], guid[13], guid[14], guid[15]);
+}
static gboolean
get_constraints (MonoImage *image, int owner, MonoClass ***constraints, MonoGenericContainer *container, MonoError *error)
{
!mono_metadata_generic_class_is_valuetype (type->data.generic_class))));
}
+mono_bool
+mono_type_is_generic_parameter (MonoType *type)
+{
+ return !type->byref && (type->type == MONO_TYPE_VAR || type->type == MONO_TYPE_MVAR);
+}
+
/**
* mono_signature_get_return_type:
* @sig: the method signature inspected