Commit 202c3319 authored by Paul Eggert's avatar Paul Eggert

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.
parent 929c9d33
Pipeline #4845 passed with stage
in 56 minutes and 34 seconds
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment