Commit be3bfff1 authored by Karl Heuer's avatar Karl Heuer

(access_keymap, store_in_keymap): Use NATNUMP instead of its expansion.

parent 40c03e12
...@@ -318,9 +318,7 @@ access_keymap (map, idx, t_ok, noinherit) ...@@ -318,9 +318,7 @@ access_keymap (map, idx, t_ok, noinherit)
break; break;
case Lisp_Vector: case Lisp_Vector:
if (INTEGERP (idx) if (NATNUMP (idx) && XFASTINT (idx) < XVECTOR (binding)->size)
&& XINT (idx) >= 0
&& XINT (idx) < XVECTOR (binding)->size)
{ {
val = XVECTOR (binding)->contents[XINT (idx)]; val = XVECTOR (binding)->contents[XINT (idx)];
if (noprefix && CONSP (val) && EQ (XCONS (val)->car, Qkeymap)) if (noprefix && CONSP (val) && EQ (XCONS (val)->car, Qkeymap))
...@@ -437,8 +435,7 @@ store_in_keymap (keymap, idx, def) ...@@ -437,8 +435,7 @@ store_in_keymap (keymap, idx, def)
switch (XTYPE (elt)) switch (XTYPE (elt))
{ {
case Lisp_Vector: case Lisp_Vector:
if (INTEGERP (idx) if (NATNUMP (idx) && XFASTINT (idx) < XVECTOR (elt)->size)
&& XINT (idx) >= 0 && XINT (idx) < XVECTOR (elt)->size)
{ {
XVECTOR (elt)->contents[XFASTINT (idx)] = def; XVECTOR (elt)->contents[XFASTINT (idx)] = def;
return def; return def;
......
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