#include <direct.h>
#endif
-/*
- * This is the version number of the corlib-runtime interface. When
- * making changes to this interface (by changing the layout
- * of classes the runtime knows about, changing icall signature or
- * semantics etc), increment this variable. Also increment the
- * pair of this variable in mscorlib in:
- * mcs/class/corlib/System/Environment.cs
- *
- * Changes which are already detected at runtime, like the addition
- * of icalls, do not require an increment.
- */
-#define MONO_CORLIB_VERSION 164
-
typedef struct
{
int runtime_count;
if (!ht) {
ht = g_hash_table_new (mono_aligned_addr_hash, NULL);
destroy_ht = TRUE;
+ for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
+ g_hash_table_insert (ht, tmp->data, tmp->data);
+ }
}
/* FIXME: handle lazy loaded assemblies */
- for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
- g_hash_table_insert (ht, tmp->data, tmp->data);
- }
+
if (!g_hash_table_lookup (ht, ass)) {
mono_assembly_addref (ass);
g_hash_table_insert (ht, ass, ass);
}
if (ass->image->references) {
- for (i = 0; ass->image->references [i] != NULL; i++) {
- if (ass->image->references [i] != REFERENCE_MISSING)
+ for (i = 0; i < ass->image->nreferences; i++) {
+ if (ass->image->references[i] && ass->image->references [i] != REFERENCE_MISSING) {
if (!g_hash_table_lookup (ht, ass->image->references [i])) {
add_assemblies_to_domain (domain, ass->image->references [i], ht);
}
+ }
}
}
if (destroy_ht)