diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-05-09 19:29:05 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-05-09 19:29:05 +0000 |
commit | 2af8ad2b725d0842959534bc867f3ee53e52f998 (patch) | |
tree | 25e48f4a13e0b732a0207211a668e33e25bd2608 /src/util/Table.c | |
parent | 67b088637e37dccb0d267444f6326257de3d5649 (diff) |
From Jonathan Thornburg:
Change our fake version of the C99/C++ "bool" type from
typedef enum { false = 0, true = 1 } bool;
to
typedef int bool;
#define true 1
#define false 0
so we can assign an int to a bool without triggering compiler warnings
on the origin.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2804 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/util/Table.c')
-rw-r--r-- | src/util/Table.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/util/Table.c b/src/util/Table.c index a4293f48..55603a42 100644 --- a/src/util/Table.c +++ b/src/util/Table.c @@ -98,7 +98,9 @@ #include <assert.h> /* FIXME: C99 defines <stdbool.h>, we should include that or a fake version */ -typedef enum { false = 0, true = 1 } bool; +typedef int bool; +#define true 1 +#define false 0 #ifndef CCODE #define CCODE /* signal Cactus header files that we're C, not Fortran */ @@ -2467,8 +2469,8 @@ int Util_TableItCreate(int handle) /*@@ @routine Util_TableItClone @desc This function clones (makes an exact copy of) a table - iterator. That is, it creates a new iterator which points - to the same table entry as an existing iterator. + iterator. That is, it creates a new iterator which points + to the same table entry as an existing iterator. @var ihandle @vtype int |