[lkml]   [2006]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC][PATCH] A generic boolean (version 6)
    Citerar Josef Sipek <>:

    > On Wed, Jul 26, 2006 at 06:06:22PM -0700, Paul Jackson wrote:
    > > Richard wrote:
    > > > * removed the #undef false/true and #define false/true
    > >
    > > Good - thanks.
    > >
    > > +enum {
    > > + false = 0,
    > > + true = 1
    > > +};
    > You probably have said it before, but why do we need this?

    Well Jeff, there is no _need_ for the false and true, but it makes the code more
    readable to many of us. (Why else is there all these definitions of false and true?)
    There is other opinions on this and that is one of the reason* bool isn't
    defined as:

    enum { false, true } bool;

    letting us choose our own way.
    So when (hopefully) the converting to these starts, it will only affect the
    files already using some sort of false and true. If the author is more
    comfortable with 0 and 1's, that will be respectet (by me, at least).

    Hope it make some sense.

    > Josef "Jeff" Sipek.

    /Richard Knutsson

    If I got you wrong and you meant why it can't be defined where it is used, I
    refere you to Andrew's mail "[patch 1/1] consolidate TRUE and FALSE", where a
    redefinition occured (of TRUE/FALSE).

    * another is that C99 defines the boolean type for us (as _Bool).

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-07-27 05:55    [W:0.043 / U:17.920 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site