Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
d1ca81d9
Commit
d1ca81d9
authored
Apr 26, 2004
by
Andreas Schwab
Browse files
(read1): Use BOOL_VECTOR_BITS_PER_CHAR instead of BITS_PER_CHAR for
bool vectors.
parent
4435a68a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/lread.c
src/lread.c
+6
-5
No files found.
src/lread.c
View file @
d1ca81d9
...
...
@@ -1993,8 +1993,9 @@ read1 (readcharfun, pch, first_in_list)
if
(
c
==
'"'
)
{
Lisp_Object
tmp
,
val
;
int
size_in_chars
=
((
XFASTINT
(
length
)
+
BITS_PER_CHAR
-
1
)
/
BITS_PER_CHAR
);
int
size_in_chars
=
((
XFASTINT
(
length
)
+
BOOL_VECTOR_BITS_PER_CHAR
-
1
)
/
BOOL_VECTOR_BITS_PER_CHAR
);
UNREAD
(
c
);
tmp
=
read1
(
readcharfun
,
pch
,
first_in_list
);
...
...
@@ -2003,7 +2004,7 @@ read1 (readcharfun, pch, first_in_list)
when the number of bits was a multiple of 8.
Accept such input in case it came from an old version. */
&&
!
(
XFASTINT
(
length
)
==
(
SCHARS
(
tmp
)
-
1
)
*
BITS_PER_CHAR
))
==
(
SCHARS
(
tmp
)
-
1
)
*
BOOL_VECTOR_
BITS_PER_CHAR
))
Fsignal
(
Qinvalid_read_syntax
,
Fcons
(
make_string
(
"#&..."
,
5
),
Qnil
));
...
...
@@ -2011,9 +2012,9 @@ read1 (readcharfun, pch, first_in_list)
bcopy
(
SDATA
(
tmp
),
XBOOL_VECTOR
(
val
)
->
data
,
size_in_chars
);
/* Clear the extraneous bits in the last byte. */
if
(
XINT
(
length
)
!=
size_in_chars
*
BITS_PER_CHAR
)
if
(
XINT
(
length
)
!=
size_in_chars
*
BOOL_VECTOR_
BITS_PER_CHAR
)
XBOOL_VECTOR
(
val
)
->
data
[
size_in_chars
-
1
]
&=
(
1
<<
(
XINT
(
length
)
%
BITS_PER_CHAR
))
-
1
;
&=
(
1
<<
(
XINT
(
length
)
%
BOOL_VECTOR_
BITS_PER_CHAR
))
-
1
;
return
val
;
}
Fsignal
(
Qinvalid_read_syntax
,
Fcons
(
make_string
(
"#&..."
,
5
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment