aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorKaroly Lorentey2004-04-27 15:53:30 +0000
committerKaroly Lorentey2004-04-27 15:53:30 +0000
commit6c8caecfb9c96879b8ea6f1e08314408be40a832 (patch)
treecec3e345d246fe9b789786da588c5c6334215679 /src/alloc.c
parentced7ed5611e2a6e60a5ac7a97e165545843d0fa9 (diff)
parentc4c07982c1a6b3ddd9339ecdb9af1876f70d8792 (diff)
downloademacs-6c8caecfb9c96879b8ea6f1e08314408be40a832.tar.gz
emacs-6c8caecfb9c96879b8ea6f1e08314408be40a832.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-241 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-242 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-243 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-244 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-245 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-246 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-247 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-248 src/lisp.h (CYCLE_CHECK): Macro moved from xfaces.c * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-249 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-250 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-251 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-252 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-253 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-254 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-255 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-153
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 723d664cbe0..29351952860 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1950,10 +1950,11 @@ LENGTH must be a number. INIT matters only in whether it is t or nil. */)
1950 1950
1951 CHECK_NATNUM (length); 1951 CHECK_NATNUM (length);
1952 1952
1953 bits_per_value = sizeof (EMACS_INT) * BITS_PER_CHAR; 1953 bits_per_value = sizeof (EMACS_INT) * BOOL_VECTOR_BITS_PER_CHAR;
1954 1954
1955 length_in_elts = (XFASTINT (length) + bits_per_value - 1) / bits_per_value; 1955 length_in_elts = (XFASTINT (length) + bits_per_value - 1) / bits_per_value;
1956 length_in_chars = ((XFASTINT (length) + BITS_PER_CHAR - 1) / BITS_PER_CHAR); 1956 length_in_chars = ((XFASTINT (length) + BOOL_VECTOR_BITS_PER_CHAR - 1)
1957 / BOOL_VECTOR_BITS_PER_CHAR);
1957 1958
1958 /* We must allocate one more elements than LENGTH_IN_ELTS for the 1959 /* We must allocate one more elements than LENGTH_IN_ELTS for the
1959 slot `size' of the struct Lisp_Bool_Vector. */ 1960 slot `size' of the struct Lisp_Bool_Vector. */
@@ -1970,9 +1971,9 @@ LENGTH must be a number. INIT matters only in whether it is t or nil. */)
1970 p->data[i] = real_init; 1971 p->data[i] = real_init;
1971 1972
1972 /* Clear the extraneous bits in the last byte. */ 1973 /* Clear the extraneous bits in the last byte. */
1973 if (XINT (length) != length_in_chars * BITS_PER_CHAR) 1974 if (XINT (length) != length_in_chars * BOOL_VECTOR_BITS_PER_CHAR)
1974 XBOOL_VECTOR (val)->data[length_in_chars - 1] 1975 XBOOL_VECTOR (val)->data[length_in_chars - 1]
1975 &= (1 << (XINT (length) % BITS_PER_CHAR)) - 1; 1976 &= (1 << (XINT (length) % BOOL_VECTOR_BITS_PER_CHAR)) - 1;
1976 1977
1977 return val; 1978 return val;
1978} 1979}