Re: [Evolution-hackers] Why a bitfield in CamelOfflineFolder?
- From: Jeffrey Stedfast <fejj novell com>
- To: Matthew Barnes <mbarnes redhat com>
- Cc: evolution-hackers gnome org
- Subject: Re: [Evolution-hackers] Why a bitfield in CamelOfflineFolder?
- Date: Thu, 30 Nov 2006 13:22:59 -0500
On Thu, 2006-11-30 at 12:08 -0500, Matthew Barnes wrote:
> On Thu, 2006-11-30 at 11:51 -0500, Jeffrey Stedfast wrote:
> > 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;
>
> I'm just curious, but what's the advantage of bitfields over just having
> an integer field called "flags" and defining the individual flags as
> enum values? The latter approach has all the advantages that Jeff
> enumerated, but it also allows you to work with groups of flags at once
> (e.g. masking, copying, etc.). Perhaps that's not relevant for this
> particular case?
in this particular case, it's unlikely that usage would be useful.
>
> Matthew Barnes
>
> _______________________________________________
> Evolution-hackers mailing list
> Evolution-hackers gnome org
> http://mail.gnome.org/mailman/listinfo/evolution-hackers
--
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]