CamelStoreClass has the following method:
GCompareFunc compare_folder_name;
Both the method name and call signature imply this is a strcmp()-style
function where a zero return value means the values are equal. But in
fact this method is used as an equality test where a zero return value
means the values are NOT equal.
Rename the method and change its call signature like so:
GEqualFunc equal_folder_name;
This is an API break but clearly a necessary one.
return g_str_hash (key);
}
return g_str_hash (key);
}
imapx_name_equal (gconstpointer a,
gconstpointer b)
{
imapx_name_equal (gconstpointer a,
gconstpointer b)
{
store_class = CAMEL_STORE_CLASS (class);
store_class->hash_folder_name = imapx_name_hash;
store_class = CAMEL_STORE_CLASS (class);
store_class->hash_folder_name = imapx_name_hash;
- store_class->compare_folder_name = imapx_name_equal;
+ store_class->equal_folder_name = imapx_name_equal;
store_class->can_refresh_folder = imapx_can_refresh_folder;
store_class->free_folder_info = camel_store_free_folder_info_full;
store_class->get_folder_sync = imapx_store_get_folder_sync;
store_class->can_refresh_folder = imapx_can_refresh_folder;
store_class->free_folder_info = camel_store_free_folder_info_full;
store_class->get_folder_sync = imapx_store_get_folder_sync;
class = CAMEL_STORE_GET_CLASS (store);
g_return_if_fail (class->hash_folder_name != NULL);
class = CAMEL_STORE_GET_CLASS (store);
g_return_if_fail (class->hash_folder_name != NULL);
- g_return_if_fail (class->compare_folder_name != NULL);
+ g_return_if_fail (class->equal_folder_name != NULL);
store->folders = camel_object_bag_new (
class->hash_folder_name,
store->folders = camel_object_bag_new (
class->hash_folder_name,
- class->compare_folder_name,
+ class->equal_folder_name,
(CamelCopyFunc) g_strdup, g_free);
}
(CamelCopyFunc) g_strdup, g_free);
}
service_class->settings_type = CAMEL_TYPE_STORE_SETTINGS;
class->hash_folder_name = g_str_hash;
service_class->settings_type = CAMEL_TYPE_STORE_SETTINGS;
class->hash_folder_name = g_str_hash;
- class->compare_folder_name = g_str_equal;
+ class->equal_folder_name = g_str_equal;
class->can_refresh_folder = store_can_refresh_folder;
class->get_inbox_folder_sync = store_get_inbox_folder_sync;
class->can_refresh_folder = store_can_refresh_folder;
class->get_inbox_folder_sync = store_get_inbox_folder_sync;
CamelServiceClass parent_class;
GHashFunc hash_folder_name;
CamelServiceClass parent_class;
GHashFunc hash_folder_name;
- GCompareFunc compare_folder_name;
+ GEqualFunc equal_folder_name;
/* Non-Blocking Methods */
gboolean (*can_refresh_folder) (CamelStore *store,
/* Non-Blocking Methods */
gboolean (*can_refresh_folder) (CamelStore *store,
static CamelFolder *imap_store_get_junk_folder_sync (CamelStore *store, GCancellable *cancellable, GError **error);
static CamelFolder *imap_store_get_trash_folder_sync (CamelStore *store, GCancellable *cancellable, GError **error);
static guint hash_folder_name (gconstpointer key);
static CamelFolder *imap_store_get_junk_folder_sync (CamelStore *store, GCancellable *cancellable, GError **error);
static CamelFolder *imap_store_get_trash_folder_sync (CamelStore *store, GCancellable *cancellable, GError **error);
static guint hash_folder_name (gconstpointer key);
-static gint compare_folder_name (gconstpointer a, gconstpointer b);
+static gboolean equal_folder_name (gconstpointer a, gconstpointer b);
static CamelFolderInfo *imap_store_create_folder_sync (CamelStore *store, const gchar *parent_name, const gchar *folder_name, GCancellable *cancellable, GError **error);
static gboolean imap_store_delete_folder_sync (CamelStore *store, const gchar *folder_name, GCancellable *cancellable, GError **error);
static CamelFolderInfo *imap_store_create_folder_sync (CamelStore *store, const gchar *parent_name, const gchar *folder_name, GCancellable *cancellable, GError **error);
static gboolean imap_store_delete_folder_sync (CamelStore *store, const gchar *folder_name, GCancellable *cancellable, GError **error);
store_class = CAMEL_STORE_CLASS (class);
store_class->hash_folder_name = hash_folder_name;
store_class = CAMEL_STORE_CLASS (class);
store_class->hash_folder_name = hash_folder_name;
- store_class->compare_folder_name = compare_folder_name;
+ store_class->equal_folder_name = equal_folder_name;
store_class->can_refresh_folder = imap_can_refresh_folder;
store_class->free_folder_info = camel_store_free_folder_info_full;
store_class->get_folder_sync = imap_store_get_folder_sync;
store_class->can_refresh_folder = imap_can_refresh_folder;
store_class->free_folder_info = camel_store_free_folder_info_full;
store_class->get_folder_sync = imap_store_get_folder_sync;
return g_str_hash (key);
}
return g_str_hash (key);
}
-static gint
-compare_folder_name (gconstpointer a,
- gconstpointer b)
+static gboolean
+equal_folder_name (gconstpointer a,
+ gconstpointer b)
{
gconstpointer aname = a, bname = b;
{
gconstpointer aname = a, bname = b;
-maildir_store_compare_folder_name (gconstpointer a,
- gconstpointer b)
+maildir_store_equal_folder_name (gconstpointer a,
+ gconstpointer b)
{
return g_str_equal (md_canon_name (a), md_canon_name (b));
}
{
return g_str_equal (md_canon_name (a), md_canon_name (b));
}
store_class = CAMEL_STORE_CLASS (class);
store_class->hash_folder_name = maildir_store_hash_folder_name;
store_class = CAMEL_STORE_CLASS (class);
store_class->hash_folder_name = maildir_store_hash_folder_name;
- store_class->compare_folder_name = maildir_store_compare_folder_name;
+ store_class->equal_folder_name = maildir_store_equal_folder_name;
store_class->create_folder_sync = maildir_store_create_folder_sync;
store_class->free_folder_info = camel_store_free_folder_info_full;
store_class->get_folder_sync = maildir_store_get_folder_sync;
store_class->create_folder_sync = maildir_store_create_folder_sync;
store_class->free_folder_info = camel_store_free_folder_info_full;
store_class->get_folder_sync = maildir_store_get_folder_sync;
LIBEBOOK_REVISION=1
LIBEBOOK_AGE=3
LIBEBOOK_REVISION=1
LIBEBOOK_AGE=3
LIBCAMEL_REVISION=0
LIBCAMEL_AGE=0
LIBCAMEL_REVISION=0
LIBCAMEL_AGE=0