#include <glib.h>
typedef struct _MonoImage MonoImage;
-typedef struct _MonoImage MonoMetadata;
typedef struct {
+ int ref_count;
+ char *name;
+
MonoImage *image;
/* Load files here */
} MonoAssembly;
typedef struct {
- guint32 offset;
+ const char* data;
guint32 size;
} MonoStreamHeader;
char *base;
/*
- * Tables contain up to 9 rows and the possible sizes of the
+ * Tables contain up to 9 columns and the possible sizes of the
* fields in the documentation are 1, 2 and 4 bytes. So we
* can encode in 2 bits the size.
*
int ref_count;
FILE *f;
char *name;
+ const char *assembly_name;
void *image_info;
char *raw_metadata;
*/
GHashTable *method_cache;
GHashTable *class_cache;
+ /*
+ * Indexes namespaces to hash tables that map class name to typedef token.
+ */
+ GHashTable *name_cache;
/*
* Indexed by ((rank << 24) | (typedef & 0xffffff)), which limits us to a
MonoImage *mono_image_open (const char *fname,
enum MonoImageOpenStatus *status);
+MonoImage *mono_image_loaded (const char *name);
void mono_image_close (MonoImage *image);
const char *mono_image_strerror (enum MonoImageOpenStatus status);
-
int mono_image_ensure_section (MonoImage *image,
const char *section);
int mono_image_ensure_section_idx (MonoImage *image,