aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1994-10-06 22:31:59 +0000
committerKarl Heuer1994-10-06 22:31:59 +0000
commit2836d9a4dcefd35ab080b5c1714b7bbfdf5eaa57 (patch)
treeacb870b3ed3daec14a8e72bcf1839fa32abcfa03 /src
parentaab808227e3e75dacde6b376545989bc0dac8cb5 (diff)
downloademacs-2836d9a4dcefd35ab080b5c1714b7bbfdf5eaa57.tar.gz
emacs-2836d9a4dcefd35ab080b5c1714b7bbfdf5eaa57.zip
(defvar_per_buffer): Access buffer_local_flags as Lisp_Object, not int.
Give XSETBUFFER_OBJFWD an integer offset, not a pointer.
Diffstat (limited to 'src')
-rw-r--r--src/lread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lread.c b/src/lread.c
index fbe6366534e..e29d46dccdb 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1826,7 +1826,8 @@ defvar_lisp_nopro (namestring, address)
1826#ifndef standalone 1826#ifndef standalone
1827 1827
1828/* Similar but define a variable whose value is the Lisp Object stored in 1828/* Similar but define a variable whose value is the Lisp Object stored in
1829 the current buffer. address is the address of the slot in the buffer that is current now. */ 1829 the current buffer. address is the address of the slot in the buffer
1830 that is current now. */
1830 1831
1831void 1832void
1832defvar_per_buffer (namestring, address, type, doc) 1833defvar_per_buffer (namestring, address, type, doc)
@@ -1842,11 +1843,10 @@ defvar_per_buffer (namestring, address, type, doc)
1842 sym = intern (namestring); 1843 sym = intern (namestring);
1843 offset = (char *)address - (char *)current_buffer; 1844 offset = (char *)address - (char *)current_buffer;
1844 1845
1845 XSETBUFFER_OBJFWD (XSYMBOL (sym)->value, 1846 XSETBUFFER_OBJFWD (XSYMBOL (sym)->value, offset);
1846 (Lisp_Object *) offset);
1847 *(Lisp_Object *)(offset + (char *)&buffer_local_symbols) = sym; 1847 *(Lisp_Object *)(offset + (char *)&buffer_local_symbols) = sym;
1848 *(Lisp_Object *)(offset + (char *)&buffer_local_types) = type; 1848 *(Lisp_Object *)(offset + (char *)&buffer_local_types) = type;
1849 if (*(int *)(offset + (char *)&buffer_local_flags) == 0) 1849 if (XINT (*(Lisp_Object *)(offset + (char *)&buffer_local_flags)) == 0)
1850 /* Did a DEFVAR_PER_BUFFER without initializing the corresponding 1850 /* Did a DEFVAR_PER_BUFFER without initializing the corresponding
1851 slot of buffer_local_flags */ 1851 slot of buffer_local_flags */
1852 abort (); 1852 abort ();