{
MonoImage *m = class->image;
const int top = class->field.count;
- MonoTableInfo *t = &m->tables [MONO_TABLE_FIELD];
int i;
g_assert (class->enumtype);
MonoGenericContainer *container = NULL;
MonoType *ftype;
- mono_metadata_decode_row (t, idx, cols, MONO_FIELD_SIZE);
+ mono_metadata_decode_table_row (m, MONO_TABLE_FIELD, idx, cols, MONO_FIELD_SIZE);
sig = mono_metadata_blob_heap (m, cols [MONO_FIELD_SIGNATURE]);
mono_metadata_decode_value (sig, &sig);
/* FIELD signature == 0x06 */
MonoImage *m = class->image;
int top = class->field.count;
guint32 layout = class->flags & TYPE_ATTRIBUTE_LAYOUT_MASK;
- MonoTableInfo *t = &m->tables [MONO_TABLE_FIELD];
int i, blittable = TRUE;
guint32 real_size = 0;
guint32 packing_size = 0;
const char *sig;
guint32 cols [MONO_FIELD_SIZE];
- mono_metadata_decode_row (t, idx, cols, MONO_FIELD_SIZE);
+ mono_metadata_decode_table_row (m, MONO_TABLE_FIELD, idx, cols, MONO_FIELD_SIZE);
/* The name is needed for fieldrefs */
field->name = mono_metadata_string_heap (m, cols [MONO_FIELD_NAME]);
sig = mono_metadata_blob_heap (m, cols [MONO_FIELD_SIGNATURE]);
{
guint startm, endm, i, j;
guint32 cols [MONO_PROPERTY_SIZE];
- MonoTableInfo *pt = &class->image->tables [MONO_TABLE_PROPERTY];
MonoTableInfo *msemt = &class->image->tables [MONO_TABLE_METHODSEMANTICS];
MonoProperty *properties;
guint32 last;
properties = mono_mempool_alloc0 (class->image->mempool, sizeof (MonoProperty) * class->property.count);
for (i = class->property.first; i < last; ++i) {
- mono_metadata_decode_row (pt, i, cols, MONO_PROPERTY_SIZE);
+ mono_metadata_decode_table_row (class->image, MONO_TABLE_PROPERTY, i, cols, MONO_PROPERTY_SIZE);
properties [i - class->property.first].parent = class;
properties [i - class->property.first].attrs = cols [MONO_PROPERTY_FLAGS];
properties [i - class->property.first].name = mono_metadata_string_heap (class->image, cols [MONO_PROPERTY_NAME]);
{
guint startm, endm, i, j;
guint32 cols [MONO_EVENT_SIZE];
- MonoTableInfo *pt = &class->image->tables [MONO_TABLE_EVENT];
MonoTableInfo *msemt = &class->image->tables [MONO_TABLE_METHODSEMANTICS];
guint32 last;
MonoEvent *events;
events = mono_mempool_alloc0 (class->image->mempool, sizeof (MonoEvent) * class->event.count);
for (i = class->event.first; i < last; ++i) {
MonoEvent *event = &events [i - class->event.first];
-
- mono_metadata_decode_row (pt, i, cols, MONO_EVENT_SIZE);
+
+ mono_metadata_decode_table_row (class->image, MONO_TABLE_EVENT, i, cols, MONO_EVENT_SIZE);
event->parent = class;
event->attrs = cols [MONO_EVENT_FLAGS];
event->name = mono_metadata_string_heap (class->image, cols [MONO_EVENT_NAME]);
* Obtains a MonoClass with a given namespace and a given name which
* is located in the given MonoImage. The namespace and name
* lookups are case insensitive.
- *
- * You can also pass @NULL to the image, and that will lookup for
- * a type with the given namespace and name in all of the loaded
- * assemblies: notice that since there might be a name clash in this
- * case, passing @NULL is not encouraged if you need a precise type.
- *
*/
MonoClass *
mono_class_from_name_case (MonoImage *image, const char* name_space, const char *name)
*
* Obtains a MonoClass with a given namespace and a given name which
* is located in the given MonoImage.
- *
- * You can also pass `NULL' to the image, and that will lookup for
- * a type with the given namespace and name in all of the loaded
- * assemblies: notice that since there might be a name clash in this
- * case, passing NULL is not encouraged if you need a precise type.
- *
*/
MonoClass *
mono_class_from_name (MonoImage *image, const char* name_space, const char *name)
return &klass->byval_arg;
}
+/**
+ * mono_class_get_type_token
+ * @klass: the MonoClass to act on
+ *
+ * This method returns type token for the class.
+ *
+ * Returns: the type token for the class.
+ */
+guint32
+mono_class_get_type_token (MonoClass *klass)
+{
+ return klass->type_token;
+}
+
/**
* mono_class_get_byref_type:
* @klass: the MonoClass to act on
return field->type->attrs;
}
+/**
+ * mono_field_get_data;
+ * @field: the MonoClassField to act on
+ *
+ * Returns: pointer to the metadata constant value or to the field
+ * data if it has an RVA flag.
+ */
+const char *
+mono_field_get_data (MonoClassField *field)
+{
+ return field->data;
+}
+
/**
* mono_property_get_name:
* @prop: the MonoProperty to act on