Re: [Evolution-hackers] Why a bitfield in CamelOfflineFolder?
- From: Jeffrey Stedfast <fejj novell com>
 
- To: Jules Colding <colding omesc com>
 
- Cc: Evolution Hackers <evolution-hackers gnome org>
 
- Subject: Re: [Evolution-hackers] Why a bitfield in CamelOfflineFolder?
 
- Date: Thu, 30 Nov 2006 11:51:19 -0500
 
wow, that came out totally wrong...
using a single bit allows us to extend the structure with more bitfields
w/o breaking ABI if we find we need to.
it's akin to having:
unsigned int sync_offline:1;
unsigned int unused:31;
On Thu, 2006-11-30 at 11:41 -0500, Jeffrey Stedfast wrote:
> the idea is that we only need 1 bit as a boolean... if we declare it as
> a boolean now, then later if we discover we need more state, then we
> have to add a whole new boolean to avoid breaking ABI.
> 
> In this fashion, we have 31 more bits available to us :)
> 
> Jeff
> 
> On Thu, 2006-11-30 at 09:43 +0100, Jules Colding wrote:
> > Hi,
> > 
> > Is this really necessary?  
> > 
> > struct _CamelOfflineFolder {
> >         CamelFolder parent_object;
> > 
> >         unsigned int sync_offline:1;
> > };
> > 
> > Wouldn't it be much better/simpler/cleaner simply to do:
> > 
> > struct _CamelOfflineFolder {
> >         CamelFolder parent_object;
> > 
> >         gboolean sync_offline;
> > };
> > 
> > ??
> > 
-- 
Jeffrey Stedfast
Desktop Hacker - Novell, Inc.
fejj novell com  - www.novell.com
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]