changeset 13145:4ce211a90724

(describe_vector): Use Flength to get length of vector.
author Richard M. Stallman <rms@gnu.org>
date Sat, 07 Oct 1995 22:00:06 +0000
parents fd14ccddb85a
children 6182d95acd14
files src/keymap.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Sat Oct 07 21:59:28 1995 +0000
+++ b/src/keymap.c	Sat Oct 07 22:00:06 1995 +0000
@@ -2295,6 +2295,7 @@
   Lisp_Object suppress;
   Lisp_Object kludge;
   int first = 1;
+  int size;
   struct gcpro gcpro1, gcpro2, gcpro3;
 
   definition = Qnil;
@@ -2308,7 +2309,10 @@
   if (partial)
     suppress = intern ("suppress-keymap");
 
-  for (i = 0; i < XVECTOR (vector)->size; i++)
+  /* This does the right thing for char-tables as well as ordinary vectors.  */
+  size = XFASTINT (Flength (vector));
+
+  for (i = 0; i < size; i++)
     {
       QUIT;
       definition = get_keyelt (XVECTOR (vector)->contents[i], 0);