Mercurial > emacs
changeset 25421:65a7e9c02d4f
(struct Lisp_Cons, XCAR, XCDR, struct Lisp_Float): Change names of structure
elements if HIDE_LISP_IMPLEMENTATION is defined, to help detect code that uses
knowledge of the Lisp internals that it shouldn't have.
(XFLOAT_DATA): New macro.
author | Ken Raeburn <raeburn@raeburn.org> |
---|---|
date | Sat, 28 Aug 1999 22:15:12 +0000 |
parents | 1026df56062c |
children | 8c3f90931a9e |
files | src/lisp.h |
diffstat | 1 files changed, 21 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lisp.h Sat Aug 28 18:25:40 1999 +0000 +++ b/src/lisp.h Sat Aug 28 22:15:12 1999 +0000 @@ -525,12 +525,23 @@ struct Lisp_Cons { + /* Please do not use the names of these elements in code other + than the core lisp implementation. Use XCAR and XCDR below. */ +#ifdef HIDE_LISP_IMPLEMENTATION + Lisp_Object car_, cdr_; +#else Lisp_Object car, cdr; +#endif }; /* Take the car or cdr of something known to be a cons cell. */ +#ifdef HIDE_LISP_IMPLEMENTATION +#define XCAR(c) (XCONS ((c))->car_) +#define XCDR(c) (XCONS ((c))->cdr_) +#else #define XCAR(c) (XCONS ((c))->car) #define XCDR(c) (XCONS ((c))->cdr) +#endif /* Take the car or cdr of something whose type is not known. */ #define CAR(c) \ @@ -1012,8 +1023,18 @@ { Lisp_Object type; /* essentially used for mark-bit and chaining when on free-list */ +#ifdef HIDE_LISP_IMPLEMENTATION + double data_; +#else double data; +#endif }; + +#ifdef HIDE_LISP_IMPLEMENTATION +#define XFLOAT_DATA(f) (XFLOAT (f)->data_) +#else +#define XFLOAT_DATA(f) (XFLOAT (f)->data) +#endif #endif /* LISP_FLOAT_TYPE */ /* A character, declared with the following typedef, is a member