Merge pull request #3831 from rolfbjarne/watchos-fix-defaultproxy-test
[mono.git] / mono / metadata / metadata.h
index afc21d48e66a222e41b33846c4b5368659b977f0..6036fe3ae7dcf7e576e50f2af39f30d8ede9410e 100644 (file)
 
 MONO_BEGIN_DECLS
 
-/*
- * When embedding, you have to define MONO_ZERO_LEN_ARRAY before including any
- * other Mono header file if you use a different compiler from the one used to
- * build Mono.
- */
-#ifndef MONO_ZERO_LEN_ARRAY
-#ifdef __GNUC__
-#define MONO_ZERO_LEN_ARRAY 0
-#else
-#define MONO_ZERO_LEN_ARRAY 1
-#endif
-#endif
-
 #define MONO_TYPE_ISSTRUCT(t) mono_type_is_struct (t)
 #define MONO_TYPE_IS_VOID(t) mono_type_is_void (t)
 #define MONO_TYPE_IS_POINTER(t) mono_type_is_pointer (t)
@@ -89,6 +76,9 @@ typedef enum {
        MONO_NATIVE_LPSTRUCT = 0x2b,
        MONO_NATIVE_CUSTOM = 0x2c,
        MONO_NATIVE_ERROR = 0x2d,
+       // TODO: MONO_NATIVE_IINSPECTABLE = 0x2e
+       // TODO: MONO_NATIVE_HSTRING = 0x2f
+       MONO_NATIVE_UTF8STR = 0x30,
        MONO_NATIVE_MAX = 0x50 /* no info */
 } MonoMarshalNative;
 
@@ -175,9 +165,15 @@ typedef enum {
        MONO_MARSHAL_FREE_ARRAY,
        MONO_MARSHAL_CONV_BSTR_STR,
        MONO_MARSHAL_CONV_SAFEHANDLE,
-       MONO_MARSHAL_CONV_HANDLEREF
+       MONO_MARSHAL_CONV_HANDLEREF,
+       MONO_MARSHAL_CONV_STR_UTF8STR,
+       MONO_MARSHAL_CONV_SB_UTF8STR,
+       MONO_MARSHAL_CONV_UTF8STR_STR,
+       MONO_MARSHAL_CONV_UTF8STR_SB,
 } MonoMarshalConv;
 
+#define MONO_MARSHAL_CONV_INVALID ((MonoMarshalConv)-1)
+
 typedef struct {
        MonoMarshalNative native;
        union {
@@ -295,7 +291,6 @@ typedef struct {
 typedef struct _MonoType MonoType;
 typedef struct _MonoGenericInst MonoGenericInst;
 typedef struct _MonoGenericClass MonoGenericClass;
-typedef struct _MonoDynamicGenericClass MonoDynamicGenericClass;
 typedef struct _MonoGenericContext MonoGenericContext;
 typedef struct _MonoGenericContainer MonoGenericContainer;
 typedef struct _MonoGenericParam MonoGenericParam;
@@ -312,7 +307,10 @@ typedef struct {
 
 struct _MonoArrayType {
        MonoClass *eklass;
+       // Number of dimensions of the array
        uint8_t rank;
+
+       // Arrays recording known upper and lower index bounds for each dimension
        uint8_t numsizes;
        uint8_t numlobounds;
        int *sizes;
@@ -358,6 +356,7 @@ MONO_API mono_bool mono_type_is_struct    (MonoType *type);
 MONO_API mono_bool mono_type_is_void      (MonoType *type);
 MONO_API mono_bool mono_type_is_pointer   (MonoType *type);
 MONO_API mono_bool mono_type_is_reference (MonoType *type);
+mono_bool mono_type_is_generic_parameter (MonoType *type);
 
 MONO_API MonoType*
 mono_signature_get_return_type (MonoMethodSignature *sig);
@@ -433,6 +432,7 @@ MONO_API MonoMethodSignature  *mono_metadata_signature_alloc (MonoImage *image,
 
 MONO_API MonoMethodSignature  *mono_metadata_signature_dup (MonoMethodSignature *sig);
 
+MONO_RT_EXTERNAL_ONLY
 MONO_API MonoMethodSignature  *mono_metadata_parse_signature (MonoImage *image, 
                                                     uint32_t    token);
 
@@ -490,6 +490,8 @@ MONO_API uint32_t mono_metadata_token_from_dor (uint32_t dor_index);
 
 MONO_API char *mono_guid_to_string (const uint8_t *guid);
 
+MONO_API char *mono_guid_to_string_minimal (const uint8_t *guid);
+
 MONO_API uint32_t mono_metadata_declsec_from_index (MonoImage *meta, uint32_t idx);
 
 MONO_API uint32_t mono_metadata_translate_token_index (MonoImage *image, int table, uint32_t idx);