[gmime/gmime-2-4] Fixed to allow re-initialization



commit f35409448d998332f4c2f1e68a5d113545f653f9
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Fri Mar 26 09:39:40 2010 -0400

    Fixed to allow re-initialization
    
    	(g_mime_object_type_registry_shutdown): Set type_hash to NULL
    	after destroying it so that a re-init will work.

 ChangeLog            |    3 ++-
 gmime/gmime-object.c |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6a18868..f58467f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,7 +9,8 @@
 	* gmime/gmime-object.c (g_mime_object_type_registry_init): Renamed
 	a bit and fixed to not use g_atexit(). Also made internal-public.
 	(g_mime_object_type_registry_shutdown): Renamed and made
-	internal-public.
+	internal-public. Also set type_hash to NULL after destroying it so
+	that a re-init will work.
 	(g_mime_object_register_type): Don't init the type system anymore.
 	(g_mime_object_new): Same.
 	(g_mime_object_new_type): Same here.
diff --git a/gmime/gmime-object.c b/gmime/gmime-object.c
index be766f7..5712a1d 100644
--- a/gmime/gmime-object.c
+++ b/gmime/gmime-object.c
@@ -1056,6 +1056,7 @@ g_mime_object_type_registry_shutdown (void)
 {
 	g_hash_table_foreach (type_hash, type_bucket_foreach, NULL);
 	g_hash_table_destroy (type_hash);
+	type_hash = NULL;
 }
 
 void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]