From: Jonathan Nieder Date: Mon, 14 Jan 2013 06:52:27 GMT Subject: Re: [PATCH 12/14] imap-send.c: use struct imap_store instead of struct store Message-ID: <20130114065227.GJ3125@elie.Belkin> In-Reply-To: <1358141566-26081-13-git-send-email-mhagger@alum.mit.edu> Michael Haggerty wrote: > In fact, all struct store instances are upcasts of struct imap_store > anyway, so stop making the distinction. Nice. It is tempting to fold "struct store" into "struct imap_store" at the same time, as in struct imap_store { struct { struct store_conf *conf; /* foreign */ /* currently open mailbox */ const char *name; /* foreign! maybe preset? */ char *path; /* own */ struct message *msgs; /* own */ int uidvalidity; unsigned char opts; /* maybe preset? */ /* note that the following do _not_ reflect stats from msgs, but mailbox totals */ int count; /* # of messages */ int recent; /* # of recent messages - don't trust this beyond the initial read */ } gen; int uidvalidity; struct imap *imap; const char *prefix; unsigned /*currentnc:1,*/ trashnc:1; }; to help the reader verify that objects of type "struct store" are not used except through the gen field of imap_store after this change. But verifying directly worked fine, so never mind. ;-)