2007-05-08 Robert Jordan <robertj@gmx.net>
[mono.git] / mono / metadata / metadata.h
index 3770faae57187d33c206ef98316d7a632df3a2f7..446e1463cd835bdc7786a436e903b6f2e326ccb4 100644 (file)
@@ -16,7 +16,10 @@ G_BEGIN_DECLS
 #define MONO_ZERO_LEN_ARRAY 1
 #endif
 
-#define MONO_TYPE_ISSTRUCT(t) (!(t)->byref && (((t)->type == MONO_TYPE_VALUETYPE && !(t)->data.klass->enumtype) || ((t)->type == MONO_TYPE_TYPEDBYREF) || (((t)->type == MONO_TYPE_GENERICINST) && mono_metadata_generic_class_is_valuetype ((t)->data.generic_class))))
+#define MONO_TYPE_ISSTRUCT(t) (!(t)->byref && (((t)->type == MONO_TYPE_VALUETYPE && \
+       !(t)->data.klass->enumtype) || ((t)->type == MONO_TYPE_TYPEDBYREF) || \
+       (((t)->type == MONO_TYPE_GENERICINST) && mono_metadata_generic_class_is_valuetype ((t)->data.generic_class) && !(t)->data.generic_class->container_class->enumtype)))
+
 #define MONO_TYPE_IS_VOID(t) ((t) && ((t)->type == MONO_TYPE_VOID) && !(t)->byref)
 #define MONO_TYPE_IS_POINTER(t) ((t) && (((t)->byref || ((t)->type == MONO_TYPE_I) || (t)->type == MONO_TYPE_STRING) || ((t)->type == MONO_TYPE_SZARRAY) || ((t)->type == MONO_TYPE_CLASS) || ((t)->type == MONO_TYPE_CLASS) || ((t)->type == MONO_TYPE_OBJECT) || ((t)->type == MONO_TYPE_ARRAY) || ((t)->type == MONO_TYPE_PTR)))
 
@@ -173,7 +176,9 @@ typedef enum {
        MONO_MARSHAL_CONV_DEL_FTN,
        MONO_MARSHAL_CONV_FTN_DEL,
        MONO_MARSHAL_FREE_ARRAY,
-       MONO_MARSHAL_CONV_BSTR_STR
+       MONO_MARSHAL_CONV_BSTR_STR,
+       MONO_MARSHAL_CONV_SAFEHANDLE,
+       MONO_MARSHAL_CONV_HANDLEREF
 } MonoMarshalConv;
 
 typedef struct {
@@ -290,7 +295,6 @@ typedef struct {
 typedef struct _MonoType MonoType;
 typedef struct _MonoGenericInst MonoGenericInst;
 typedef struct _MonoGenericClass MonoGenericClass;
-typedef struct _MonoInflatedGenericClass MonoInflatedGenericClass;
 typedef struct _MonoDynamicGenericClass MonoDynamicGenericClass;
 typedef struct _MonoGenericMethod MonoGenericMethod;
 typedef struct _MonoGenericContext MonoGenericContext;
@@ -512,6 +516,17 @@ char *mono_guid_to_string (const guint8 *guid);
 
 guint32 mono_metadata_declsec_from_index (MonoImage *meta, guint32 idx);
 
+guint32 mono_metadata_translate_token_index (MonoImage *image, int table, guint32 idx);
+
+void    mono_metadata_decode_table_row (MonoImage *image, int table,
+                                      int                    idx,
+                                      guint32               *res,
+                                      int                    res_size);
+
+guint32      mono_metadata_decode_table_row_col (MonoImage *image, int table,
+                                          int            idx, 
+                                          guint          col);
+
 G_END_DECLS
 
 #endif /* __MONO_METADATA_H__ */