dovecot-2.0: lib-storage: Removed struct mail.get_index_mail(). ...

dovecot at dovecot.org dovecot at dovecot.org
Thu May 13 10:13:50 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/66bb67e074e2
changeset: 11291:66bb67e074e2
user:      Timo Sirainen <tss at iki.fi>
date:      Thu May 13 09:13:45 2010 +0200
description:
lib-storage: Removed struct mail.get_index_mail(). get_real_mail() is basically the same.

diffstat:

 src/lib-storage/index/cydir/cydir-mail.c       |   3 +--
 src/lib-storage/index/dbox-multi/mdbox-mail.c  |   3 +--
 src/lib-storage/index/dbox-single/sdbox-mail.c |   3 +--
 src/lib-storage/index/index-mail.c             |   5 -----
 src/lib-storage/index/index-search.c           |   2 +-
 src/lib-storage/index/maildir/maildir-mail.c   |   3 +--
 src/lib-storage/index/mbox/mbox-mail.c         |   3 +--
 src/lib-storage/index/raw/raw-mail.c           |   3 +--
 src/lib-storage/mail-storage-private.h         |   2 --
 src/lib-storage/test-mail.c                    |   9 +--------
 src/plugins/virtual/virtual-mail.c             |  10 +---------
 11 files changed, 9 insertions(+), 37 deletions(-)

diffs (151 lines):

diff -r fc664579ee4f -r 66bb67e074e2 src/lib-storage/index/cydir/cydir-mail.c
--- a/src/lib-storage/index/cydir/cydir-mail.c	Thu May 13 09:01:51 2010 +0200
+++ b/src/lib-storage/index/cydir/cydir-mail.c	Thu May 13 09:13:45 2010 +0200
@@ -149,6 +149,5 @@
 	index_mail_update_uid,
 	NULL,
 	index_mail_expunge,
-	index_mail_set_cache_corrupted,
-	index_mail_get_index_mail
+	index_mail_set_cache_corrupted
 };
diff -r fc664579ee4f -r 66bb67e074e2 src/lib-storage/index/dbox-multi/mdbox-mail.c
--- a/src/lib-storage/index/dbox-multi/mdbox-mail.c	Thu May 13 09:01:51 2010 +0200
+++ b/src/lib-storage/index/dbox-multi/mdbox-mail.c	Thu May 13 09:13:45 2010 +0200
@@ -215,6 +215,5 @@
 	index_mail_update_uid,
 	NULL,
 	index_mail_expunge,
-	index_mail_set_cache_corrupted,
-	index_mail_get_index_mail
+	index_mail_set_cache_corrupted
 };
diff -r fc664579ee4f -r 66bb67e074e2 src/lib-storage/index/dbox-single/sdbox-mail.c
--- a/src/lib-storage/index/dbox-single/sdbox-mail.c	Thu May 13 09:01:51 2010 +0200
+++ b/src/lib-storage/index/dbox-single/sdbox-mail.c	Thu May 13 09:13:45 2010 +0200
@@ -105,6 +105,5 @@
 	index_mail_update_uid,
 	NULL,
 	index_mail_expunge,
-	index_mail_set_cache_corrupted,
-	index_mail_get_index_mail
+	index_mail_set_cache_corrupted
 };
diff -r fc664579ee4f -r 66bb67e074e2 src/lib-storage/index/index-mail.c
--- a/src/lib-storage/index/index-mail.c	Thu May 13 09:01:51 2010 +0200
+++ b/src/lib-storage/index/index-mail.c	Thu May 13 09:13:45 2010 +0200
@@ -1533,8 +1533,3 @@
 				 "Broken %s for mail UID %u",
 				 field_name, mail->uid);
 }
-
-struct index_mail *index_mail_get_index_mail(struct mail *mail)
-{
-	return (struct index_mail *)mail;
-}
diff -r fc664579ee4f -r 66bb67e074e2 src/lib-storage/index/index-search.c
--- a/src/lib-storage/index/index-search.c	Thu May 13 09:01:51 2010 +0200
+++ b/src/lib-storage/index/index-search.c	Thu May 13 09:13:45 2010 +0200
@@ -1356,7 +1356,7 @@
 	cost1 = search_mail_get_cost(mail_private);
 	while (box->v.search_next_update_seq(_ctx)) {
 		mail_set_seq(mail, _ctx->seq);
-		ctx->imail = mail_private->v.get_index_mail(mail);
+		ctx->imail = (struct index_mail *)mail_get_real_mail(mail);
 
 		T_BEGIN {
 			match = search_match_next(ctx);
diff -r fc664579ee4f -r 66bb67e074e2 src/lib-storage/index/maildir/maildir-mail.c
--- a/src/lib-storage/index/maildir/maildir-mail.c	Thu May 13 09:01:51 2010 +0200
+++ b/src/lib-storage/index/maildir/maildir-mail.c	Thu May 13 09:13:45 2010 +0200
@@ -592,6 +592,5 @@
 	maildir_mail_update_uid,
 	maildir_update_pop3_uidl,
 	index_mail_expunge,
-	maildir_mail_set_cache_corrupted,
-	index_mail_get_index_mail
+	maildir_mail_set_cache_corrupted
 };
diff -r fc664579ee4f -r 66bb67e074e2 src/lib-storage/index/mbox/mbox-mail.c
--- a/src/lib-storage/index/mbox/mbox-mail.c	Thu May 13 09:01:51 2010 +0200
+++ b/src/lib-storage/index/mbox/mbox-mail.c	Thu May 13 09:13:45 2010 +0200
@@ -410,6 +410,5 @@
 	index_mail_update_uid,
 	NULL,
 	index_mail_expunge,
-	index_mail_set_cache_corrupted,
-	index_mail_get_index_mail
+	index_mail_set_cache_corrupted
 };
diff -r fc664579ee4f -r 66bb67e074e2 src/lib-storage/index/raw/raw-mail.c
--- a/src/lib-storage/index/raw/raw-mail.c	Thu May 13 09:01:51 2010 +0200
+++ b/src/lib-storage/index/raw/raw-mail.c	Thu May 13 09:13:45 2010 +0200
@@ -139,6 +139,5 @@
 	index_mail_update_uid,
 	NULL,
 	index_mail_expunge,
-	index_mail_set_cache_corrupted,
-	index_mail_get_index_mail
+	index_mail_set_cache_corrupted
 };
diff -r fc664579ee4f -r 66bb67e074e2 src/lib-storage/mail-storage-private.h
--- a/src/lib-storage/mail-storage-private.h	Thu May 13 09:01:51 2010 +0200
+++ b/src/lib-storage/mail-storage-private.h	Thu May 13 09:13:45 2010 +0200
@@ -318,8 +318,6 @@
 	void (*expunge)(struct mail *mail);
 	void (*set_cache_corrupted)(struct mail *mail,
 				    enum mail_fetch_field field);
-
-	struct index_mail *(*get_index_mail)(struct mail *mail);
 };
 
 union mail_module_context {
diff -r fc664579ee4f -r 66bb67e074e2 src/lib-storage/test-mail.c
--- a/src/lib-storage/test-mail.c	Thu May 13 09:01:51 2010 +0200
+++ b/src/lib-storage/test-mail.c	Thu May 13 09:13:45 2010 +0200
@@ -206,12 +206,6 @@
 {
 }
 
-static struct index_mail *
-test_mail_get_index_mail(struct mail *mail ATTR_UNUSED)
-{
-	return NULL;
-}
-
 struct mail_vfuncs test_mail_vfuncs = {
 	NULL,
 	test_mail_free,
@@ -241,6 +235,5 @@
 	test_mail_update_uid,
 	NULL,
 	test_mail_expunge,
-	test_mail_set_cache_corrupted,
-	test_mail_get_index_mail
+	test_mail_set_cache_corrupted
 };
diff -r fc664579ee4f -r 66bb67e074e2 src/plugins/virtual/virtual-mail.c
--- a/src/plugins/virtual/virtual-mail.c	Thu May 13 09:01:51 2010 +0200
+++ b/src/plugins/virtual/virtual-mail.c	Thu May 13 09:13:45 2010 +0200
@@ -379,13 +379,6 @@
 	mail_set_cache_corrupted(vmail->backend_mail, field);
 }
 
-static struct index_mail *virtual_mail_get_index_mail(struct mail *mail)
-{
-	struct virtual_mail *vmail = (struct virtual_mail *)mail;
-
-	return (struct index_mail *)vmail->backend_mail;
-}
-
 struct mail_vfuncs virtual_mail_vfuncs = {
 	NULL,
 	virtual_mail_free,
@@ -415,6 +408,5 @@
 	index_mail_update_uid,
 	virtual_mail_update_pop3_uidl,
 	virtual_mail_expunge,
-	virtual_mail_set_cache_corrupted,
-	virtual_mail_get_index_mail
+	virtual_mail_set_cache_corrupted
 };


More information about the dovecot-cvs mailing list