diff options
| author | Stefan Monnier | 2007-09-20 21:24:14 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-09-20 21:24:14 +0000 |
| commit | 49e49fb5dd6543c6c21c5a3d9045f3bf3adb55b3 (patch) | |
| tree | e74ed1b65b75d0c9557cbe88cf91f74a72caa546 /src | |
| parent | 4e213843485cac239ba74a13c3ef7ca19c23c936 (diff) | |
| download | emacs-49e49fb5dd6543c6c21c5a3d9045f3bf3adb55b3.tar.gz emacs-49e49fb5dd6543c6c21c5a3d9045f3bf3adb55b3.zip | |
(enum pvec_type): New `terminal' pseudovector.
(XTERMINAL, XSETTERMINAL, TERMINALP, GC_TERMINALP): New macros.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lisp.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lisp.h b/src/lisp.h index a241613c138..2b0ccdb9b07 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -274,7 +274,8 @@ typedef EMACS_INT Lisp_Object; | |||
| 274 | 274 | ||
| 275 | /* In a pseudovector, the size field actually contains a word with one | 275 | /* In a pseudovector, the size field actually contains a word with one |
| 276 | PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to | 276 | PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to |
| 277 | indicate the actual type. */ | 277 | indicate the actual type. |
| 278 | FIXME: Why a bitset if only one of the bits can ever be set at a time? */ | ||
| 278 | enum pvec_type | 279 | enum pvec_type |
| 279 | { | 280 | { |
| 280 | PVEC_NORMAL_VECTOR = 0, | 281 | PVEC_NORMAL_VECTOR = 0, |
| @@ -288,7 +289,8 @@ enum pvec_type | |||
| 288 | PVEC_BOOL_VECTOR = 0x10000, | 289 | PVEC_BOOL_VECTOR = 0x10000, |
| 289 | PVEC_BUFFER = 0x20000, | 290 | PVEC_BUFFER = 0x20000, |
| 290 | PVEC_HASH_TABLE = 0x40000, | 291 | PVEC_HASH_TABLE = 0x40000, |
| 291 | PVEC_TYPE_MASK = 0x7fe00 | 292 | PVEC_TERMINAL = 0x80000, |
| 293 | PVEC_TYPE_MASK = 0xffe00 | ||
| 292 | 294 | ||
| 293 | #if 0 /* This is used to make the value of PSEUDOVECTOR_FLAG available to | 295 | #if 0 /* This is used to make the value of PSEUDOVECTOR_FLAG available to |
| 294 | GDB. It doesn't work on OS Alpha. Moved to a variable in | 296 | GDB. It doesn't work on OS Alpha. Moved to a variable in |
| @@ -538,6 +540,7 @@ extern size_t pure_size; | |||
| 538 | 540 | ||
| 539 | #define XPROCESS(a) (eassert (GC_PROCESSP(a)),(struct Lisp_Process *) XPNTR(a)) | 541 | #define XPROCESS(a) (eassert (GC_PROCESSP(a)),(struct Lisp_Process *) XPNTR(a)) |
| 540 | #define XWINDOW(a) (eassert (GC_WINDOWP(a)),(struct window *) XPNTR(a)) | 542 | #define XWINDOW(a) (eassert (GC_WINDOWP(a)),(struct window *) XPNTR(a)) |
| 543 | #define XTERMINAL(a) (eassert (GC_TERMINALP(a)),(struct terminal *) XPNTR(a)) | ||
| 541 | #define XSUBR(a) (eassert (GC_SUBRP(a)),(struct Lisp_Subr *) XPNTR(a)) | 544 | #define XSUBR(a) (eassert (GC_SUBRP(a)),(struct Lisp_Subr *) XPNTR(a)) |
| 542 | #define XBUFFER(a) (eassert (GC_BUFFERP(a)),(struct buffer *) XPNTR(a)) | 545 | #define XBUFFER(a) (eassert (GC_BUFFERP(a)),(struct buffer *) XPNTR(a)) |
| 543 | #define XCHAR_TABLE(a) ((struct Lisp_Char_Table *) XPNTR(a)) | 546 | #define XCHAR_TABLE(a) ((struct Lisp_Char_Table *) XPNTR(a)) |
| @@ -565,6 +568,7 @@ extern size_t pure_size; | |||
| 565 | (XSETPSEUDOVECTOR (a, b, PVEC_WINDOW_CONFIGURATION)) | 568 | (XSETPSEUDOVECTOR (a, b, PVEC_WINDOW_CONFIGURATION)) |
| 566 | #define XSETPROCESS(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_PROCESS)) | 569 | #define XSETPROCESS(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_PROCESS)) |
| 567 | #define XSETWINDOW(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_WINDOW)) | 570 | #define XSETWINDOW(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_WINDOW)) |
| 571 | #define XSETTERMINAL(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_TERMINAL)) | ||
| 568 | #define XSETSUBR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUBR)) | 572 | #define XSETSUBR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUBR)) |
| 569 | #define XSETCOMPILED(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_COMPILED)) | 573 | #define XSETCOMPILED(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_COMPILED)) |
| 570 | #define XSETBUFFER(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BUFFER)) | 574 | #define XSETBUFFER(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BUFFER)) |
| @@ -1517,6 +1521,8 @@ typedef unsigned char UCHAR; | |||
| 1517 | #define GC_PROCESSP(x) GC_PSEUDOVECTORP (x, PVEC_PROCESS) | 1521 | #define GC_PROCESSP(x) GC_PSEUDOVECTORP (x, PVEC_PROCESS) |
| 1518 | #define WINDOWP(x) PSEUDOVECTORP (x, PVEC_WINDOW) | 1522 | #define WINDOWP(x) PSEUDOVECTORP (x, PVEC_WINDOW) |
| 1519 | #define GC_WINDOWP(x) GC_PSEUDOVECTORP (x, PVEC_WINDOW) | 1523 | #define GC_WINDOWP(x) GC_PSEUDOVECTORP (x, PVEC_WINDOW) |
| 1524 | #define TERMINALP(x) PSEUDOVECTORP (x, PVEC_TERMINAL) | ||
| 1525 | #define GC_TERMINALP(x) GC_PSEUDOVECTORP (x, PVEC_TERMINAL) | ||
| 1520 | #define SUBRP(x) PSEUDOVECTORP (x, PVEC_SUBR) | 1526 | #define SUBRP(x) PSEUDOVECTORP (x, PVEC_SUBR) |
| 1521 | #define GC_SUBRP(x) GC_PSEUDOVECTORP (x, PVEC_SUBR) | 1527 | #define GC_SUBRP(x) GC_PSEUDOVECTORP (x, PVEC_SUBR) |
| 1522 | #define COMPILEDP(x) PSEUDOVECTORP (x, PVEC_COMPILED) | 1528 | #define COMPILEDP(x) PSEUDOVECTORP (x, PVEC_COMPILED) |