* mono-endian.h, mono-endian.c: new macro MONO_DOUBLE_ASSERT_ENDIANITY to
[mono.git] / mono / metadata / image.h
index c47189e159d2c4dc82e70fe1fa6967ed748274a5..4cbfe5f46705569cd1f3dea213596b99a3a6b7fe 100644 (file)
@@ -51,9 +51,14 @@ typedef struct {
 struct _MonoImage {
        int   ref_count;
        FILE *f;
+       /* if f is NULL the image was loaded rom raw data */
+       char *raw_data;
+       guint32 raw_data_len;
+       gboolean raw_data_allocated;
        char *name;
        const char *assembly_name;
        const char *module_name;
+       const char *version;
        char *guid;
        void *image_info;
 
@@ -91,6 +96,8 @@ struct _MonoImage {
         */
        GHashTable *method_cache;
        GHashTable *class_cache;
+       /* indexed by a generic type instantiation */
+       GHashTable *generics_cache;
        /*
         * Indexes namespaces to hash tables that map class name to typedef token.
         */
@@ -136,8 +143,11 @@ typedef enum {
 
 MonoImage    *mono_image_open     (const char *fname,
                                   MonoImageOpenStatus *status);
+MonoImage    *mono_image_open_from_data (char *data, guint32 data_len, gboolean need_copy,
+                                         MonoImageOpenStatus *status);
 MonoImage    *mono_image_loaded   (const char *name);
 MonoImage    *mono_image_loaded_by_guid (const char *guid);
+void          mono_image_init     (MonoImage *image);
 void          mono_image_close    (MonoImage *image);
 const char   *mono_image_strerror (MonoImageOpenStatus status);
 
@@ -162,6 +172,6 @@ const char*   mono_image_get_strong_name (MonoImage *image, guint32 *size);
 guint32       mono_image_strong_name_position (MonoImage *image, guint32 *size);
 void          mono_image_add_to_name_cache (MonoImage *image, 
                                                                                        const char *nspace, 
-                                                                                       const char *name, guint32 index);
+                                                                                       const char *name, guint32 idx);
 
 #endif