summaryrefslogtreecommitdiff
path: root/src/data.c
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2007-11-21 20:59:47 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2007-11-21 20:59:47 +0000
commit64e16c3c22db9f01922a4f3efb936c4265ccec7a (patch)
tree62cd4f172cedd91260805d9b9951918141dbbe43 /src/data.c
parentcb01ce3f055a415bbe4f2be4fbd0e4a7f320d688 (diff)
downloademacs-64e16c3c22db9f01922a4f3efb936c4265ccec7a.tar.gz
* lisp.h (struct Lisp_Buffer_Objfwd): Add a `slottype' field.
* data.c (store_symval_forwarding): Get type from buffer_objfwd. Update call to buffer_slot_type_mismatch. * buffer.h (buffer_local_types, PER_BUFFER_TYPE): Remove. (buffer_slot_type_mismatch): Update. * buffer.c (buffer_local_types): Remove. (buffer_slot_type_mismatch): Get the symbol and type as arguments. (defvar_per_buffer): Set the type in the buffer_objfwd.
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/data.c b/src/data.c
index 2ee84f01a14..4a63eb7d2f5 100644
--- a/src/data.c
+++ b/src/data.c
@@ -930,7 +930,7 @@ store_symval_forwarding (symbol, valcontents, newval, buf)
break;
case Lisp_Misc_Boolfwd:
- *XBOOLFWD (valcontents)->boolvar = NILP (newval) ? 0 : 1;
+ *XBOOLFWD (valcontents)->boolvar = !NILP (newval);
break;
case Lisp_Misc_Objfwd:
@@ -970,12 +970,11 @@ store_symval_forwarding (symbol, valcontents, newval, buf)
case Lisp_Misc_Buffer_Objfwd:
{
int offset = XBUFFER_OBJFWD (valcontents)->offset;
- Lisp_Object type;
+ Lisp_Object type = XBUFFER_OBJFWD (valcontents)->slottype;
- type = PER_BUFFER_TYPE (offset);
if (! NILP (type) && ! NILP (newval)
&& XTYPE (newval) != XINT (type))
- buffer_slot_type_mismatch (offset);
+ buffer_slot_type_mismatch (symbol, XINT (type));
if (buf == NULL)
buf = current_buffer;