aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2012-11-06 12:48:35 -0800
committerPaul Eggert2012-11-06 12:48:35 -0800
commitb6b3b29458fefcf7f31a0b14d6484cf262db2e54 (patch)
tree837c983a721d58904ee3d27ed76e41921290807c /src
parente770aad5f0151321610e3dafa09592e31d166296 (diff)
downloademacs-b6b3b29458fefcf7f31a0b14d6484cf262db2e54.tar.gz
emacs-b6b3b29458fefcf7f31a0b14d6484cf262db2e54.zip
Restore some duplicate definitions.
This undoes part of the 2012-11-03 changes. Some people build with plain -g rather than with -g3, and they need the duplicate definitions for .gdbinit to work; see <http://bugs.gnu.org/12814#26>. * lisp.h (GCTYPEBITS, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Define as macros, as well as as enums or as constants.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/lisp.h19
2 files changed, 23 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6b9d77d2275..37907cd555a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12012-11-06 Paul Eggert <eggert@cs.ucla.edu>
2
3 Restore some duplicate definitions (Bug#12814).
4 This undoes part of the 2012-11-03 changes. Some people build
5 with plain -g rather than with -g3, and they need the duplicate
6 definitions for .gdbinit to work; see <http://bugs.gnu.org/12814#26>.
7 * lisp.h (GCTYPEBITS, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK):
8 Define as macros, as well as as enums or as constants.
9
12012-11-06 Jan Djärv <jan.h.d@swipnet.se> 102012-11-06 Jan Djärv <jan.h.d@swipnet.se>
2 11
3 * nsterm.m (convert_ns_to_X_keysym, keyDown:): Add NSNumericPadKeyMask 12 * nsterm.m (convert_ns_to_X_keysym, keyDown:): Add NSNumericPadKeyMask
diff --git a/src/lisp.h b/src/lisp.h
index 97764eb24bd..88d9b766f38 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -152,15 +152,18 @@ extern bool suppress_checking EXTERNALLY_VISIBLE;
152 on the few static Lisp_Objects used: all the defsubr as well 152 on the few static Lisp_Objects used: all the defsubr as well
153 as the two special buffers buffer_defaults and buffer_local_symbols. */ 153 as the two special buffers buffer_defaults and buffer_local_symbols. */
154 154
155/* Number of bits in a Lisp_Object tag. This can be used in #if. */ 155enum Lisp_Bits
156 {
157 /* Number of bits in a Lisp_Object tag. This can be used in #if,
158 and for GDB's sake also as a regular symbol. */
159 GCTYPEBITS =
156#define GCTYPEBITS 3 160#define GCTYPEBITS 3
161 GCTYPEBITS,
157 162
158/* 2**GCTYPEBITS. This must be a macro that expands to a literal 163 /* 2**GCTYPEBITS. This must be a macro that expands to a literal
159 integer constant, for MSVC. */ 164 integer constant, for MSVC. */
160#define GCALIGNMENT 8 165#define GCALIGNMENT 8
161 166
162enum Lisp_Bits
163 {
164 /* Number of bits in a Lisp_Object value, not counting the tag. */ 167 /* Number of bits in a Lisp_Object value, not counting the tag. */
165 VALBITS = BITS_PER_EMACS_INT - GCTYPEBITS, 168 VALBITS = BITS_PER_EMACS_INT - GCTYPEBITS,
166 169
@@ -378,11 +381,15 @@ enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = 0 };
378 381
379/* In the size word of a vector, this bit means the vector has been marked. */ 382/* In the size word of a vector, this bit means the vector has been marked. */
380 383
384static ptrdiff_t const ARRAY_MARK_FLAG
381#define ARRAY_MARK_FLAG PTRDIFF_MIN 385#define ARRAY_MARK_FLAG PTRDIFF_MIN
386 = ARRAY_MARK_FLAG;
382 387
383/* In the size word of a struct Lisp_Vector, this bit means it's really 388/* In the size word of a struct Lisp_Vector, this bit means it's really
384 some other vector-like object. */ 389 some other vector-like object. */
390static ptrdiff_t const PSEUDOVECTOR_FLAG
385#define PSEUDOVECTOR_FLAG (PTRDIFF_MAX - PTRDIFF_MAX / 2) 391#define PSEUDOVECTOR_FLAG (PTRDIFF_MAX - PTRDIFF_MAX / 2)
392 = PSEUDOVECTOR_FLAG;
386 393
387/* In a pseudovector, the size field actually contains a word with one 394/* In a pseudovector, the size field actually contains a word with one
388 PSEUDOVECTOR_FLAG bit set, and one of the following values extracted 395 PSEUDOVECTOR_FLAG bit set, and one of the following values extracted
@@ -464,7 +471,9 @@ enum lsb_bits
464 471
465#else /* not USE_LSB_TAG */ 472#else /* not USE_LSB_TAG */
466 473
474static EMACS_INT const VALMASK
467#define VALMASK VAL_MAX 475#define VALMASK VAL_MAX
476 = VALMASK;
468 477
469#define XTYPE(a) ((enum Lisp_Type) ((EMACS_UINT) XLI (a) >> VALBITS)) 478#define XTYPE(a) ((enum Lisp_Type) ((EMACS_UINT) XLI (a) >> VALBITS))
470 479