Re: [Evolution-hackers] Why a bitfield in CamelOfflineFolder?
- From: Jules Colding <colding omesc com>
- To: Jeffrey Stedfast <fejj novell com>
- Cc: Evolution Hackers <evolution-hackers gnome org>
- Subject: Re: [Evolution-hackers] Why a bitfield in CamelOfflineFolder?
- Date: Fri, 01 Dec 2006 11:29:58 +0100
On Thu, 2006-11-30 at 11:51 -0500, Jeffrey Stedfast wrote:
> wow, that came out totally wrong...
You can say that... ;-)
> 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;
OK, that makes more sense.
Thanks,
jules
>
> 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;
> > > };
> > >
> > > ??
> > >
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]