Mercurial > emacs
comparison src/lread.c @ 21935:8dad06385435
(read1): Clear out extraneous bits at end of bool-vector.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Mon, 04 May 1998 15:29:47 +0000 |
parents | 8087931b409e |
children | 6635a9f225a9 |
comparison
equal
deleted
inserted
replaced
21934:809dbde64976 | 21935:8dad06385435 |
---|---|
1510 Fcons (make_string ("#&...", 5), Qnil)); | 1510 Fcons (make_string ("#&...", 5), Qnil)); |
1511 | 1511 |
1512 val = Fmake_bool_vector (length, Qnil); | 1512 val = Fmake_bool_vector (length, Qnil); |
1513 bcopy (XSTRING (tmp)->data, XBOOL_VECTOR (val)->data, | 1513 bcopy (XSTRING (tmp)->data, XBOOL_VECTOR (val)->data, |
1514 size_in_chars); | 1514 size_in_chars); |
1515 /* Clear the extraneous bits in the last byte. */ | |
1516 if (XINT (length) != size_in_chars * BITS_PER_CHAR) | |
1517 XBOOL_VECTOR (val)->data[size_in_chars - 1] | |
1518 &= (1 << (XINT (length) % BITS_PER_CHAR)) - 1; | |
1515 return val; | 1519 return val; |
1516 } | 1520 } |
1517 Fsignal (Qinvalid_read_syntax, Fcons (make_string ("#&...", 5), | 1521 Fsignal (Qinvalid_read_syntax, Fcons (make_string ("#&...", 5), |
1518 Qnil)); | 1522 Qnil)); |
1519 } | 1523 } |