Uniform use of the return error from mono_dl
[mono.git] / mono / utils / mono-hash.c
index 9ef0dbc134e7f8c7728f299c4d1b460fec83561e..c6c947b9f2a72e38fb46165e4493669d20bd847d 100644 (file)
@@ -391,6 +391,19 @@ g_hash_node_new (gint gc_type)
                  hash_node = mono_gc_alloc_fixed (sizeof (MonoGHashNode), NULL);
          }
   }
+#else
+#ifdef _EGLIB_MAJOR
+  G_LOCK (g_hash_global);
+  if (node_free_list)
+    {
+      hash_node = node_free_list;
+      node_free_list = node_free_list->next;
+    }
+  else
+    {
+      hash_node = g_new0 (MonoGHashNode, 1);
+    }
+  G_UNLOCK (g_hash_global);
 #else
   G_LOCK (g_hash_global);
   if (node_free_list)
@@ -408,6 +421,7 @@ g_hash_node_new (gint gc_type)
       hash_node = g_chunk_new (MonoGHashNode, node_mem_chunk);
     }
   G_UNLOCK (g_hash_global);
+  #endif
 #endif
 
   hash_node->key = NULL;