mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Add type checking for Bswitch, when enabled at compile time.
* src/bytecode.c: (exec_byte_code) If BYTE_CODE_SAFE is enabled at compile time, use CHECK_TYPE to verify that the jump table is a hash table.
This commit is contained in:
parent
1fcbd352f8
commit
522f16dac9
1 changed files with 3 additions and 0 deletions
|
|
@ -1417,6 +1417,9 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
|
|||
{
|
||||
Lisp_Object jmp_table = POP;
|
||||
Lisp_Object v1 = POP;
|
||||
#ifdef BYTE_CODE_SAFE
|
||||
CHECK_TYPE (HASH_TABLE_P (jmp_table), Qhash_table_p, jmp_table);
|
||||
#endif
|
||||
struct Lisp_Hash_Table *h = XHASH_TABLE(jmp_table);
|
||||
ptrdiff_t i = hash_lookup(h, v1, NULL);
|
||||
if (i >= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue