G_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) (!(t)->byref && (((t)->type == MONO_TYPE_VALUETYPE && \
!(t)->data.klass->enumtype) || ((t)->type == MONO_TYPE_TYPEDBYREF) || \
MONO_MARSHAL_CONV_ARRAY_BYVALCHARARRAY,
MONO_MARSHAL_CONV_ARRAY_SAVEARRAY,
MONO_MARSHAL_CONV_ARRAY_LPARRAY,
+ MONO_MARSHAL_FREE_LPARRAY,
MONO_MARSHAL_CONV_OBJECT_INTERFACE,
MONO_MARSHAL_CONV_OBJECT_IDISPATCH,
MONO_MARSHAL_CONV_OBJECT_IUNKNOWN,
((clause)->try_offset <= (offset) && (offset) < ((clause)->try_offset + (clause)->try_len))
#define MONO_OFFSET_IN_HANDLER(clause,offset) \
((clause)->handler_offset <= (offset) && (offset) < ((clause)->handler_offset + (clause)->handler_len))
+#define MONO_OFFSET_IN_FILTER(clause,offset) \
+ ((clause)->flags == MONO_EXCEPTION_CLAUSE_FILTER && (clause)->data.filter_offset <= (offset) && (offset) < ((clause)->handler_offset))
typedef struct {
guint32 flags;
typedef struct _MonoGenericInst MonoGenericInst;
typedef struct _MonoGenericClass MonoGenericClass;
typedef struct _MonoDynamicGenericClass MonoDynamicGenericClass;
-typedef struct _MonoGenericMethod MonoGenericMethod;
typedef struct _MonoGenericContext MonoGenericContext;
typedef struct _MonoGenericContainer MonoGenericContainer;
typedef struct _MonoGenericParam MonoGenericParam;
typedef struct _MonoArrayType MonoArrayType;
typedef struct _MonoMethodSignature MonoMethodSignature;
+/* FIXME: Keeping this name alive for now, since it is part of the exposed API, even though no entrypoint uses it. */
+typedef struct invalid_name MonoGenericMethod;
+
typedef struct {
unsigned int required : 1;
unsigned int token : 31;
MonoGenericClass *generic_class; /* for GENERICINST */
} data;
unsigned int attrs : 16; /* param attributes or field flags */
- unsigned int type : 8; /* ElementTypeEnum */
+ MonoTypeEnum type : 8;
unsigned int num_mods : 6; /* max 64 modifiers follow at the end */
unsigned int byref : 1;
unsigned int pinned : 1; /* valid when included in a local var signature */
MonoCustomMod modifiers [MONO_ZERO_LEN_ARRAY]; /* this may grow */
};
+#define MONO_SIZEOF_TYPE (offsetof (struct _MonoType, modifiers))
+
/*
* This structure is an internal runtime detail: use the mono_signature_*
* accessors below, because it will go away from the public header.
MonoType *params [MONO_ZERO_LEN_ARRAY];
};
+#define MONO_SIZEOF_METHOD_SIGNATURE (sizeof (struct _MonoMethodSignature) - MONO_ZERO_LEN_ARRAY * SIZEOF_VOID_P)
+
typedef struct _MonoMethodHeader MonoMethodHeader;
typedef enum {