Restore runtime check for invalid tag
* src/data.c (wrong_type_argument): Restore check that the object’s tag is valid, since invalid tags exist again. * src/lisp.h (Lisp_Type_Unused0): New constant.
This commit is contained in:
parent
929c9d3302
commit
202c3319a2
2 changed files with 3 additions and 8 deletions
10
src/data.c
10
src/data.c
|
@ -143,15 +143,9 @@ wrong_length_argument (Lisp_Object a1, Lisp_Object a2, Lisp_Object a3)
|
|||
}
|
||||
|
||||
AVOID
|
||||
wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value)
|
||||
wrong_type_argument (Lisp_Object predicate, Lisp_Object value)
|
||||
{
|
||||
/* If VALUE is not even a valid Lisp object, we'd want to abort here
|
||||
where we can get a backtrace showing where it came from. We used
|
||||
to try and do that by checking the tagbits, but nowadays all
|
||||
tagbits are potentially valid. */
|
||||
/* if ((unsigned int) XTYPE (value) >= Lisp_Type_Limit)
|
||||
* emacs_abort (); */
|
||||
|
||||
eassert (!TAGGEDP (value, Lisp_Type_Unused0));
|
||||
xsignal2 (Qwrong_type_argument, predicate, value);
|
||||
}
|
||||
|
||||
|
|
|
@ -481,6 +481,7 @@ enum Lisp_Type
|
|||
Lisp_Symbol = 0,
|
||||
|
||||
/* Type 1 is currently unused. */
|
||||
Lisp_Type_Unused0 = 1,
|
||||
|
||||
/* Fixnum. XFIXNUM (obj) is the integer value. */
|
||||
Lisp_Int0 = 2,
|
||||
|
|
Loading…
Add table
Reference in a new issue