break;
/*
- * CustomAttributeType: TypeDef, TypeRef, MethodDef,
- * MemberRef and String.
+ * CustomAttributeType: MethodDef, MemberRef.
*/
case MONO_MT_CAT_IDX:
- /* String is a heap, if it is wide, we know the size */
- /* See above, nope.
- if (meta->idx_string_wide){
- field_size = 4;
- break;
- }*/
-
- n = MAX (get_nrows (meta, MONO_TABLE_TYPEREF),
- get_nrows (meta, MONO_TABLE_TYPEDEF));
- n = MAX (n, get_nrows (meta, MONO_TABLE_METHOD));
- n = MAX (n, get_nrows (meta, MONO_TABLE_MEMBERREF));
+ n = MAX (get_nrows (meta, MONO_TABLE_METHOD),
+ get_nrows (meta, MONO_TABLE_MEMBERREF));
/* 3 bits to encode */
field_size = rtsize (meta, n, 16-3);
* \param ptr pointer to a blob object
* \param rptr the new position of the pointer
*
- * This decodes a compressed size as described by 23.1.4 (a blob or user string object)
+ * This decodes a compressed size as described by 24.2.4 (#US and #Blob a blob or user string object)
*
* \returns the size of the blob object
*/
#define NBUILTIN_TYPES() (sizeof (builtin_types) / sizeof (builtin_types [0]))
static GHashTable *type_cache = NULL;
-static int next_generic_inst_id = 0;
+static gint32 next_generic_inst_id = 0;
/* Protected by image_sets_mutex */
static MonoImageSet *mscorlib_image_set;
int size = MONO_SIZEOF_GENERIC_INST + type_argc * sizeof (MonoType *);
ginst = (MonoGenericInst *)mono_image_set_alloc0 (set, size);
#ifndef MONO_SMALL_CONFIG
- ginst->id = ++next_generic_inst_id;
+ ginst->id = InterlockedIncrement (&next_generic_inst_id);
#endif
ginst->is_open = is_open;
ginst->type_argc = type_argc;