diff options
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h index 5a4198ef683..4571c455a7b 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1112,6 +1112,25 @@ make_lisp_proc (struct Lisp_Process *p) | |||
| 1112 | #define XSETBOOL_VECTOR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BOOL_VECTOR)) | 1112 | #define XSETBOOL_VECTOR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BOOL_VECTOR)) |
| 1113 | #define XSETSUB_CHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUB_CHAR_TABLE)) | 1113 | #define XSETSUB_CHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUB_CHAR_TABLE)) |
| 1114 | 1114 | ||
| 1115 | /* Efficiently convert a pointer to a Lisp object and back. The | ||
| 1116 | pointer is represented as a Lisp integer, so the garbage collector | ||
| 1117 | does not know about it. The pointer should not have both Lisp_Int1 | ||
| 1118 | bits set, which makes this conversion inherently unportable. */ | ||
| 1119 | |||
| 1120 | INLINE void * | ||
| 1121 | XINTPTR (Lisp_Object a) | ||
| 1122 | { | ||
| 1123 | return XUNTAG (a, Lisp_Int0); | ||
| 1124 | } | ||
| 1125 | |||
| 1126 | INLINE Lisp_Object | ||
| 1127 | make_pointer_integer (void *p) | ||
| 1128 | { | ||
| 1129 | Lisp_Object a = XIL (TAG_PTR (Lisp_Int0, p)); | ||
| 1130 | eassert (INTEGERP (a) && XINTPTR (a) == p); | ||
| 1131 | return a; | ||
| 1132 | } | ||
| 1133 | |||
| 1115 | /* Type checking. */ | 1134 | /* Type checking. */ |
| 1116 | 1135 | ||
| 1117 | LISP_MACRO_DEFUN_VOID (CHECK_TYPE, | 1136 | LISP_MACRO_DEFUN_VOID (CHECK_TYPE, |