make this only work for strings, since really that's all it works for now.
authorChris Toshok <toshok@ximian.com>
Sat, 6 Dec 2003 01:27:40 +0000 (01:27 +0000)
committerChris Toshok <toshok@src.gnome.org>
Sat, 6 Dec 2003 01:27:40 +0000 (01:27 +0000)
2003-12-05  Chris Toshok  <toshok@ximian.com>

* libebook/e-contact.c (e_contact_get_const): make this only work
for strings, since really that's all it works for now.

addressbook/ChangeLog
addressbook/libebook/e-contact.c

index 0c79412..a317241 100644 (file)
@@ -1,3 +1,8 @@
+2003-12-05  Chris Toshok  <toshok@ximian.com>
+
+       * libebook/e-contact.c (e_contact_get_const): make this only work
+       for strings, since really that's all it works for now.
+
 2003-12-05  Hans Petter Jansson  <hpj@ximian.com>
 
        * libebook/e-contact.c (e_contact_get_property): Return boxed type
index d918759..2197923 100644 (file)
@@ -1152,7 +1152,6 @@ e_contact_get (EContact *contact, EContactField field_id)
        return value;
 }
 
-/* XXX this won't work for structure/list types... */
 static void
 free_const_data (gpointer data, GObject *where_object_was)
 {
@@ -1165,7 +1164,7 @@ e_contact_get_const (EContact *contact, EContactField field_id)
        gpointer value;
 
        g_return_val_if_fail (E_IS_CONTACT (contact), NULL);
-       g_return_val_if_fail (field_id >= 1 && field_id <= E_CONTACT_FIELD_LAST, NULL);
+       g_return_val_if_fail (field_id >= 1 && field_id <= E_CONTACT_LAST_SIMPLE_STRING, NULL);
 
        value = e_contact_get (contact, field_id);