diff options
| author | Karl Heuer | 1995-01-03 01:35:49 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-01-03 01:35:49 +0000 |
| commit | e2ba196c2a13614f3b9ae21695218a04211ce444 (patch) | |
| tree | 0dc6c43d156e7e12b77f9cdbc507d30f9bacf739 /src | |
| parent | 04ff97564e6f9fcd5b1cb7edddcd9939a9ffc725 (diff) | |
| download | emacs-e2ba196c2a13614f3b9ae21695218a04211ce444.tar.gz emacs-e2ba196c2a13614f3b9ae21695218a04211ce444.zip | |
(enum Lisp_Type): Don't use trailing comma.
(VALBITS, GCTYPEBITS): Define these regardless of NO_UNION_TYPE.
[!NO_UNION_TYPE] (union Lisp_Object): Use symbolic constants.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lisp.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/lisp.h b/src/lisp.h index 98126d48356..9fde4b20281 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -60,7 +60,7 @@ enum Lisp_Type | |||
| 60 | #endif /* LISP_FLOAT_TYPE */ | 60 | #endif /* LISP_FLOAT_TYPE */ |
| 61 | 61 | ||
| 62 | /* This is not a type code. It is for range checking. */ | 62 | /* This is not a type code. It is for range checking. */ |
| 63 | Lisp_Type_Limit, | 63 | Lisp_Type_Limit |
| 64 | }; | 64 | }; |
| 65 | 65 | ||
| 66 | /* This is the set of datatypes that share a common structure. | 66 | /* This is the set of datatypes that share a common structure. |
| @@ -83,6 +83,15 @@ enum Lisp_Misc_Type | |||
| 83 | Lisp_Misc_Limit | 83 | Lisp_Misc_Limit |
| 84 | }; | 84 | }; |
| 85 | 85 | ||
| 86 | /* These values are overridden by the m- file on some machines. */ | ||
| 87 | #ifndef VALBITS | ||
| 88 | #define VALBITS 28 | ||
| 89 | #endif | ||
| 90 | |||
| 91 | #ifndef GCTYPEBITS | ||
| 92 | #define GCTYPEBITS 3 | ||
| 93 | #endif | ||
| 94 | |||
| 86 | #ifndef NO_UNION_TYPE | 95 | #ifndef NO_UNION_TYPE |
| 87 | 96 | ||
| 88 | #ifndef WORDS_BIG_ENDIAN | 97 | #ifndef WORDS_BIG_ENDIAN |
| @@ -98,18 +107,18 @@ union Lisp_Object | |||
| 98 | 107 | ||
| 99 | struct | 108 | struct |
| 100 | { | 109 | { |
| 101 | int val: 24; | 110 | int val: VALBITS; |
| 102 | char type; | 111 | int type: GCTYPEBITS+1; |
| 103 | } s; | 112 | } s; |
| 104 | struct | 113 | struct |
| 105 | { | 114 | { |
| 106 | unsigned int val: 24; | 115 | unsigned int val: VALBITS; |
| 107 | char type; | 116 | int type: GCTYPEBITS+1; |
| 108 | } u; | 117 | } u; |
| 109 | struct | 118 | struct |
| 110 | { | 119 | { |
| 111 | unsigned int val: 24; | 120 | unsigned int val: VALBITS; |
| 112 | enum Lisp_Type type: 7; | 121 | enum Lisp_Type type: GCTYPEBITS; |
| 113 | /* The markbit is not really part of the value of a Lisp_Object, | 122 | /* The markbit is not really part of the value of a Lisp_Object, |
| 114 | and is always zero except during garbage collection. */ | 123 | and is always zero except during garbage collection. */ |
| 115 | unsigned int markbit: 1; | 124 | unsigned int markbit: 1; |
| @@ -128,21 +137,21 @@ union Lisp_Object | |||
| 128 | 137 | ||
| 129 | struct | 138 | struct |
| 130 | { | 139 | { |
| 131 | char type; | 140 | int type: GCTYPEBITS+1; |
| 132 | int val: 24; | 141 | int val: VALBITS; |
| 133 | } s; | 142 | } s; |
| 134 | struct | 143 | struct |
| 135 | { | 144 | { |
| 136 | char type; | 145 | int type: GCTYPEBITS+1; |
| 137 | unsigned int val: 24; | 146 | unsigned int val: VALBITS; |
| 138 | } u; | 147 | } u; |
| 139 | struct | 148 | struct |
| 140 | { | 149 | { |
| 141 | /* The markbit is not really part of the value of a Lisp_Object, | 150 | /* The markbit is not really part of the value of a Lisp_Object, |
| 142 | and is always zero except during garbage collection. */ | 151 | and is always zero except during garbage collection. */ |
| 143 | unsigned int markbit: 1; | 152 | unsigned int markbit: 1; |
| 144 | enum Lisp_Type type: 7; | 153 | enum Lisp_Type type: GCTYPEBITS; |
| 145 | unsigned int val: 24; | 154 | unsigned int val: VALBITS; |
| 146 | } gu; | 155 | } gu; |
| 147 | } | 156 | } |
| 148 | Lisp_Object; | 157 | Lisp_Object; |
| @@ -159,15 +168,6 @@ Lisp_Object; | |||
| 159 | 168 | ||
| 160 | #define Lisp_Object EMACS_INT | 169 | #define Lisp_Object EMACS_INT |
| 161 | 170 | ||
| 162 | /* These values are overridden by the m- file on some machines. */ | ||
| 163 | #ifndef VALBITS | ||
| 164 | #define VALBITS 28 | ||
| 165 | #endif | ||
| 166 | |||
| 167 | #ifndef GCTYPEBITS | ||
| 168 | #define GCTYPEBITS 3 | ||
| 169 | #endif | ||
| 170 | |||
| 171 | #ifndef VALMASK | 171 | #ifndef VALMASK |
| 172 | #define VALMASK ((((EMACS_INT) 1)<<VALBITS) - 1) | 172 | #define VALMASK ((((EMACS_INT) 1)<<VALBITS) - 1) |
| 173 | #endif | 173 | #endif |