[evolution-data-server] libebook: Define boxed EPhoneNumber type at single place



commit be0beb22c3898b38e8f43eed2ba1780c9b928e41
Author: Mathias Hasselmann <mathias openismus com>
Date:   Fri Jan 25 14:48:51 2013 +0100

    libebook: Define boxed EPhoneNumber type at single place
    
    G_DEFINE_BOXED() doesn't need the EPhoneNumber structure's size,
    so we can define the boxed type even when not using C++.
    
    See: https://bugzilla.gnome.org/show_bug.cgi?id=689622

 addressbook/libebook/e-phone-number-private.cpp |    5 -----
 addressbook/libebook/e-phone-number.c           |   13 +++----------
 2 files changed, 3 insertions(+), 15 deletions(-)
---
diff --git a/addressbook/libebook/e-phone-number-private.cpp b/addressbook/libebook/e-phone-number-private.cpp
index 99caa7f..5679f52 100644
--- a/addressbook/libebook/e-phone-number-private.cpp
+++ b/addressbook/libebook/e-phone-number-private.cpp
@@ -45,11 +45,6 @@ struct _EPhoneNumber {
 	i18n::phonenumbers::PhoneNumber phone_number;
 };
 
-G_DEFINE_BOXED_TYPE (EPhoneNumber,
-                     e_phone_number,
-                     e_phone_number_copy,
-                     e_phone_number_free)
-
 static PhoneNumberUtil *
 e_phone_number_util_get_instance (void)
 {
diff --git a/addressbook/libebook/e-phone-number.c b/addressbook/libebook/e-phone-number.c
index 47dfea1..dee3bac 100644
--- a/addressbook/libebook/e-phone-number.c
+++ b/addressbook/libebook/e-phone-number.c
@@ -29,16 +29,9 @@
 
 #include "e-phone-number-private.h"
 
-#ifndef ENABLE_PHONENUMBER
-
-/* With phonenumber support enabled the boxed type must be defined in
- * the C++ code because we cannot compute the size of C++ types here. */
-G_DEFINE_BOXED_TYPE (EPhoneNumber,
-                     e_phone_number,
-                     e_phone_number_copy,
-                     e_phone_number_free)
-
-#endif /* ENABLE_PHONENUMBER */
+G_DEFINE_BOXED_TYPE (
+	EPhoneNumber, e_phone_number,
+	e_phone_number_copy, e_phone_number_free)
 
 G_DEFINE_QUARK (e-phone-number-error-quark, e_phone_number_error)
 



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