changeset 55160:5b975496f8d9

(Faref, Faset): Use BOOL_VECTOR_BITS_PER_CHAR instead of BITS_PER_CHAR for bool vectors.
author Andreas Schwab <schwab@suse.de>
date Mon, 26 Apr 2004 21:43:33 +0000
parents e4e9ec547c6f
children beac72c0215f
files src/data.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/data.c	Mon Apr 26 21:42:49 2004 +0000
+++ b/src/data.c	Mon Apr 26 21:43:33 2004 +0000
@@ -1946,8 +1946,8 @@
       if (idxval < 0 || idxval >= XBOOL_VECTOR (array)->size)
 	args_out_of_range (array, idx);
 
-      val = (unsigned char) XBOOL_VECTOR (array)->data[idxval / BITS_PER_CHAR];
-      return (val & (1 << (idxval % BITS_PER_CHAR)) ? Qt : Qnil);
+      val = (unsigned char) XBOOL_VECTOR (array)->data[idxval / BOOL_VECTOR_BITS_PER_CHAR];
+      return (val & (1 << (idxval % BOOL_VECTOR_BITS_PER_CHAR)) ? Qt : Qnil);
     }
   else if (CHAR_TABLE_P (array))
     {
@@ -2074,13 +2074,13 @@
       if (idxval < 0 || idxval >= XBOOL_VECTOR (array)->size)
 	args_out_of_range (array, idx);
 
-      val = (unsigned char) XBOOL_VECTOR (array)->data[idxval / BITS_PER_CHAR];
+      val = (unsigned char) XBOOL_VECTOR (array)->data[idxval / BOOL_VECTOR_BITS_PER_CHAR];
 
       if (! NILP (newelt))
-	val |= 1 << (idxval % BITS_PER_CHAR);
+	val |= 1 << (idxval % BOOL_VECTOR_BITS_PER_CHAR);
       else
-	val &= ~(1 << (idxval % BITS_PER_CHAR));
-      XBOOL_VECTOR (array)->data[idxval / BITS_PER_CHAR] = val;
+	val &= ~(1 << (idxval % BOOL_VECTOR_BITS_PER_CHAR));
+      XBOOL_VECTOR (array)->data[idxval / BOOL_VECTOR_BITS_PER_CHAR] = val;
     }
   else if (CHAR_TABLE_P (array))
     {