[evolution-data-server] Remove dead Camel code that uses EStrv.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Remove dead Camel code that uses EStrv.
- Date: Fri, 9 Oct 2009 17:24:24 +0000 (UTC)
commit 90ab3ba01a2d425a553e088af3a303895da48b8c
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Oct 9 11:42:52 2009 -0500
Remove dead Camel code that uses EStrv.
camel/camel-folder-summary.c | 16 +----------
camel/camel-vee-folder.c | 2 +-
camel/providers/local/camel-maildir-summary.c | 38 ++++---------------------
3 files changed, 8 insertions(+), 48 deletions(-)
---
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index b0e9ed0..264e37a 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -161,7 +161,7 @@ camel_folder_summary_init (CamelFolderSummary *s)
s->content_info_chunks = NULL;
p->need_preview = FALSE;
p->preview_updates = g_hash_table_new (g_str_hash, g_str_equal);
-#if defined (DOESTRV) || defined (DOEPOOLV)
+#if defined (DOEPOOLV)
s->message_info_strings = CAMEL_MESSAGE_INFO_LAST;
#endif
@@ -1930,13 +1930,6 @@ camel_folder_summary_add (CamelFolderSummary *s, CamelMessageInfo *info)
CAMEL_SUMMARY_LOCK(s, summary_lock);
-/* unnecessary for pooled vectors */
-#ifdef DOESTRV
- /* this is vitally important, and also if this is ever modified, then
- the hash table needs to be resynced */
- info->strings = e_strv_pack(info->strings);
-#endif
-
/* Summary always holds a ref for the loaded infos */
/* camel_message_info_ref(info); FIXME: Check how things are loaded. */
/* FIXME[disk-summary] SHould we ref it or redesign it later on */
@@ -1958,13 +1951,6 @@ camel_folder_summary_insert (CamelFolderSummary *s, CamelMessageInfo *info, gboo
CAMEL_SUMMARY_LOCK(s, summary_lock);
-/* unnecessary for pooled vectors */
-#ifdef DOESTRV
- /* this is vitally important, and also if this is ever modified, then
- the hash table needs to be resynced */
- info->strings = e_strv_pack(info->strings);
-#endif
-
/* Summary always holds a ref for the loaded infos */
/* camel_message_info_ref(info); FIXME: Check how things are loaded. */
/* FIXME[disk-summary] SHould we ref it or redesign it later on */
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
index c34038c..5788c41 100644
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@ -29,7 +29,7 @@
#include <glib.h>
#include <glib/gi18n-lib.h>
-#if defined (DOEPOOLV) || defined (DOESTRV)
+#if defined (DOEPOOLV)
#include <libedataserver/e-memory.h>
#endif
diff --git a/camel/providers/local/camel-maildir-summary.c b/camel/providers/local/camel-maildir-summary.c
index 845f120..5fa7ffc 100644
--- a/camel/providers/local/camel-maildir-summary.c
+++ b/camel/providers/local/camel-maildir-summary.c
@@ -132,7 +132,7 @@ camel_maildir_summary_init (CamelMaildirSummary *o)
s->message_info_size = sizeof(CamelMaildirMessageInfo);
s->content_info_size = sizeof(CamelMaildirMessageContentInfo);
-#if defined (DOEPOOLV) || defined (DOESTRV)
+#if defined (DOEPOOLV)
s->message_info_strings = CAMEL_MAILDIR_INFO_LAST;
#endif
@@ -342,7 +342,7 @@ static CamelMessageInfo *message_info_new_from_header(CamelFolderSummary * s, st
static void
message_info_free(CamelFolderSummary *s, CamelMessageInfo *mi)
{
-#if !defined (DOEPOOLV) && !defined (DOESTRV)
+#if !defined (DOEPOOLV)
CamelMaildirMessageInfo *mdi = (CamelMaildirMessageInfo *)mi;
g_free(mdi->filename);
@@ -626,23 +626,11 @@ maildir_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, Ca
filename = camel_maildir_info_filename(mdi);
/* TODO: only store the extension in the mdi->filename struct, not the whole lot */
if (filename == NULL || strcmp(filename, d->d_name) != 0) {
-#ifdef DOESTRV
-/* FIXME[disk-summary] cannot modify the estrv after its been setup,
- * for mt-safe code */
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- /* need to update the summary hash ref */
- g_hash_table_remove(s->messages_uid, camel_message_info_uid(info));
- info->strings = e_strv_set_ref(info->strings, CAMEL_MAILDIR_INFO_FILENAME, d->d_name);
- info->strings = e_strv_pack(info->strings);
- g_hash_table_insert(s->messages_uid, (gchar *)camel_message_info_uid(info), info);
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-#else
-# ifdef DOEPOOLV
+#ifdef DOEPOOLV
info->strings = e_poolv_set(info->strings, CAMEL_MAILDIR_INFO_FILENAME, d->d_name, FALSE);
-# else
+#else
g_free(mdi->filename);
mdi->filename = g_strdup(d->d_name);
-# endif
#endif
}
camel_message_info_free(info);
@@ -734,9 +722,6 @@ maildir_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChange
gint count, i;
CamelMessageInfo *info;
CamelMaildirMessageInfo *mdi;
-#ifdef DOESTRV
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
-#endif
gchar *name;
struct stat st;
@@ -785,22 +770,11 @@ maildir_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChange
/* TODO: If this is made mt-safe, then this code could be a problem, since
the estrv is being modified.
Sigh, this may mean the maildir name has to be cached another way */
-#ifdef DOESTRV
-/* FIXME[disk-summary] cannot modify the estrv after its been setup, for mt-safe code */
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- /* need to update the summary hash ref */
- g_hash_table_remove(s->messages_uid, camel_message_info_uid(info));
- info->strings = e_strv_set_ref_free(info->strings, CAMEL_MAILDIR_INFO_FILENAME, newname);
- info->strings = e_strv_pack(info->strings);
- g_hash_table_insert(s->messages_uid, (gchar *)camel_message_info_uid(info), info);
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-#else
-# ifdef DOEPOOLV
+#ifdef DOEPOOLV
info->strings = e_poolv_set(info->strings, CAMEL_MAILDIR_INFO_FILENAME, newname, TRUE);
-# else
+#else
g_free(mdi->filename);
mdi->filename = newname;
-# endif
#endif
}
g_free(name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]