dovecot-2.2: lib-index: Added mail_index_view_dup_private()
dovecot at dovecot.org
dovecot at dovecot.org
Mon Aug 13 15:23:46 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/d76732546de3
changeset: 14896:d76732546de3
user: Timo Sirainen <tss at iki.fi>
date: Mon Aug 13 15:12:41 2012 +0300
description:
lib-index: Added mail_index_view_dup_private()
diffstat:
src/lib-index/mail-index-view-private.h | 2 ++
src/lib-index/mail-index-view.c | 15 +++++++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
diffs (37 lines):
diff -r 722dba791812 -r d76732546de3 src/lib-index/mail-index-view-private.h
--- a/src/lib-index/mail-index-view-private.h Mon Aug 13 15:09:30 2012 +0300
+++ b/src/lib-index/mail-index-view-private.h Mon Aug 13 15:12:41 2012 +0300
@@ -83,6 +83,8 @@
struct mail_index_map *map);
void mail_index_view_clone(struct mail_index_view *dest,
const struct mail_index_view *src);
+struct mail_index_view *
+mail_index_view_dup_private(const struct mail_index_view *src);
void mail_index_view_ref(struct mail_index_view *view);
void mail_index_view_unref_maps(struct mail_index_view *view);
void mail_index_view_add_hidden_transaction(struct mail_index_view *view,
diff -r 722dba791812 -r d76732546de3 src/lib-index/mail-index-view.c
--- a/src/lib-index/mail-index-view.c Mon Aug 13 15:09:30 2012 +0300
+++ b/src/lib-index/mail-index-view.c Mon Aug 13 15:12:41 2012 +0300
@@ -6,6 +6,21 @@
#include "mail-index-view-private.h"
#include "mail-transaction-log.h"
+struct mail_index_view *
+mail_index_view_dup_private(const struct mail_index_view *src)
+{
+ struct mail_index_view *view;
+ struct mail_index_map *map;
+
+ view = i_new(struct mail_index_view, 1);
+ mail_index_view_clone(view, src);
+
+ map = mail_index_map_clone(view->map);
+ mail_index_unmap(&view->map);
+ view->map = map;
+ return view;
+}
+
void mail_index_view_clone(struct mail_index_view *dest,
const struct mail_index_view *src)
{
More information about the dovecot-cvs
mailing list