Mercurial > emacs
changeset 9363:4ccd5f13788d
(defvar_per_buffer): Access buffer_local_flags as Lisp_Object, not int.
Give XSETBUFFER_OBJFWD an integer offset, not a pointer.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 06 Oct 1994 22:31:59 +0000 |
parents | f6dc29e7e986 |
children | 0bba3bd707c7 |
files | src/lread.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lread.c Thu Oct 06 22:30:47 1994 +0000 +++ b/src/lread.c Thu Oct 06 22:31:59 1994 +0000 @@ -1826,7 +1826,8 @@ #ifndef standalone /* Similar but define a variable whose value is the Lisp Object stored in - the current buffer. address is the address of the slot in the buffer that is current now. */ + the current buffer. address is the address of the slot in the buffer + that is current now. */ void defvar_per_buffer (namestring, address, type, doc) @@ -1842,11 +1843,10 @@ sym = intern (namestring); offset = (char *)address - (char *)current_buffer; - XSETBUFFER_OBJFWD (XSYMBOL (sym)->value, - (Lisp_Object *) offset); + XSETBUFFER_OBJFWD (XSYMBOL (sym)->value, offset); *(Lisp_Object *)(offset + (char *)&buffer_local_symbols) = sym; *(Lisp_Object *)(offset + (char *)&buffer_local_types) = type; - if (*(int *)(offset + (char *)&buffer_local_flags) == 0) + if (XINT (*(Lisp_Object *)(offset + (char *)&buffer_local_flags)) == 0) /* Did a DEFVAR_PER_BUFFER without initializing the corresponding slot of buffer_local_flags */ abort ();