Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
[mono.git] / mono / metadata / metadata.h
index d98e27abbd5bbc5eb0ed401d4ac7458fddc8321f..80b48f25e6301d14fef6c014b3d5c8ab635f4815 100644 (file)
@@ -14,6 +14,8 @@
 #define MONO_ZERO_LEN_ARRAY 1
 #endif
 
+#define MONO_TYPE_ISSTRUCT(t) (!t->byref && t->type == MONO_TYPE_VALUETYPE && !t->data.klass->enumtype)
+
 typedef struct _MonoClass MonoClass;
 typedef struct _MonoDomain MonoDomain;
 
@@ -133,13 +135,18 @@ typedef enum {
        MONO_MARSHAL_CONV_STR_TBSTR,
        MONO_MARSHAL_CONV_STR_BYVALSTR,
        MONO_MARSHAL_CONV_STR_BYVALWSTR,
+       MONO_MARSHAL_CONV_SB_LPSTR,
+       MONO_MARSHAL_CONV_LPSTR_SB,
        MONO_MARSHAL_CONV_ARRAY_BYVALARRAY,
        MONO_MARSHAL_CONV_ARRAY_SAVEARRAY,
        MONO_MARSHAL_CONV_ARRAY_LPARRAY,
        MONO_MARSHAL_CONV_OBJECT_INTERFACE,
        MONO_MARSHAL_CONV_OBJECT_IDISPATCH,
        MONO_MARSHAL_CONV_OBJECT_IUNKNOWN,
-       MONO_MARSHAL_CONV_DEL_FTN
+       MONO_MARSHAL_CONV_OBJECT_STRUCT,
+       MONO_MARSHAL_CONV_DEL_FTN,
+       MONO_MARSHAL_CONV_STRARRAY_STRLPARRAY,
+       MONO_MARSHAL_FREE_ARRAY
 } MonoMarshalConv;
 
 typedef struct {
@@ -268,7 +275,8 @@ struct _MonoMethodSignature {
        unsigned int  hasthis : 1;
        unsigned int  explicit_this   : 1;
        unsigned int  call_convention : 6;
-       unsigned int  ref_count : 24;
+       unsigned int  pinvoke   : 1;
+       unsigned int  ref_count : 23;
        guint16       param_count;
        guint16       sentinelpos;
        MonoType     *ret;
@@ -322,13 +330,15 @@ MonoType      *mono_metadata_parse_field_type  (MonoImage      *m,
                                                short            field_flags,
                                                const char      *ptr,
                                                const char      **rptr);
-MonoType      *mono_type_create_from_typespec (MonoImage        *image, 
-                                              guint32           type_spec);
+MonoType      *mono_type_create_from_typespec  (MonoImage        *image, 
+                                               guint32           type_spec);
 void           mono_metadata_free_type         (MonoType        *type);
 int            mono_type_size                  (MonoType        *type, 
                                                int             *alignment);
 int            mono_type_stack_size            (MonoType        *type, 
                                                int             *alignment);
+int            mono_type_native_stack_size     (MonoType        *type, 
+                                               int             *alignment);
 
 guint          mono_metadata_type_hash         (MonoType *t1);
 gboolean       mono_metadata_type_equal        (MonoType *t1, MonoType *t2);