next try, this time with G_DEFINE_TYPE macro, which according to Ross Burton is thread-safe

From: Thomas Mittelstaedt <tmstaedt@t-mittelstaedt.de>


---

 addressbook/libebook/e-book.c |   29 ++---------------------------
 1 files changed, 2 insertions(+), 27 deletions(-)


diff --git a/addressbook/libebook/e-book.c b/addressbook/libebook/e-book.c
index f604adb..70df1e2 100644
--- a/addressbook/libebook/e-book.c
+++ b/addressbook/libebook/e-book.c
@@ -4010,6 +4010,8 @@ kill_remaining_ops (gpointer key, gpointer value, gpointer user_data)
 	e_book_clear_op (book, op);
 }
 
+G_DEFINE_TYPE(EBook, e_book, G_TYPE_OBJECT)
+	
 static void
 e_book_init (EBook *book)
 {
@@ -4135,30 +4137,3 @@ e_book_class_init (EBookClass *klass)
 
 	object_class->dispose = e_book_dispose;
 }
-
-/**
- * e_book_get_type:
- */
-GType
-e_book_get_type (void)
-{
-	static GType type = 0;
-
-	if (! type) {
-		GTypeInfo info = {
-			sizeof (EBookClass),
-			NULL, /* base_class_init */
-			NULL, /* base_class_finalize */
-			(GClassInitFunc)  e_book_class_init,
-			NULL, /* class_finalize */
-			NULL, /* class_data */
-			sizeof (EBook),
-			0,    /* n_preallocs */
-			(GInstanceInitFunc) e_book_init
-		};
-
-		type = g_type_register_static (G_TYPE_OBJECT, "EBook", &info, 0);
-	}
-
-	return type;
-}
