diff options
author | Karl Heuer <kwzh@gnu.org> | 1994-10-12 05:14:30 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1994-10-12 05:14:30 +0000 |
commit | d288eafdfbe8b61227b47d2f340e504706e14033 (patch) | |
tree | 626d1b91b53c8fd94a62284a37ff543323ad6756 /src | |
parent | e2473733a8b7d31e16eeb6adb3bea4aa2c294e32 (diff) | |
download | emacs-d288eafdfbe8b61227b47d2f340e504706e14033.tar.gz |
(buffer_slot_type_mismatch): Take just the offset as argument. Only check
against types that are actually used.
Diffstat (limited to 'src')
-rw-r--r-- | src/buffer.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/buffer.c b/src/buffer.c index ccc0e1acf8b..0fd2e61f63e 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2424,32 +2424,26 @@ evaporate_overlays (pos) Fdelete_overlay (XCONS (hit_list)->car); } -/* Somebody has tried to store NEWVAL into the buffer-local slot with - offset XUINT (valcontents), and NEWVAL has an unacceptable type. */ +/* Somebody has tried to store a value with an unacceptable type + into the buffer-local slot with offset OFFSET. */ void -buffer_slot_type_mismatch (valcontents, newval) - Lisp_Object valcontents, newval; +buffer_slot_type_mismatch (offset) + int offset; { - unsigned int offset = XUINT (valcontents); - unsigned char *symbol_name = - (XSYMBOL (*(Lisp_Object *)(offset + (char *)&buffer_local_symbols)) - ->name->data); + Lisp_Object sym; char *type_name; - + sym = *(Lisp_Object *)(offset + (char *)&buffer_local_symbols); switch (XINT (*(Lisp_Object *)(offset + (char *)&buffer_local_types))) { case Lisp_Int: type_name = "integers"; break; case Lisp_String: type_name = "strings"; break; - case Lisp_Misc: type_name = "markers"; break; case Lisp_Symbol: type_name = "symbols"; break; - case Lisp_Cons: type_name = "lists"; break; - case Lisp_Vector: type_name = "vectors"; break; default: abort (); } error ("only %s should be stored in the buffer-local variable %s", - type_name, symbol_name); + type_name, XSYMBOL (sym)->name->data); } init_buffer_once () |